public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
@ 2012-03-28  6:57 Dan Carpenter
  2012-03-28 14:38 ` Takashi Iwai
  2012-03-28 21:43 ` Eliot Blennerhassett
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Carpenter @ 2012-03-28  6:57 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Takashi Iwai, Eliot Blennerhassett, alsa-devel, kernel-janitors

This function returns zero or -ENOMEM, but because it's type is u16, the
-ENOMEM gets changed to 65524.  None of the callers care, but lets fix
it anyway as a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index 4cc315d..8c63200 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned.
 If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and
 HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle.
 */
-u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
+int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
 							   /**< memory handle */
 	u32 size, /**< Size in bytes to allocate */
 	struct pci_dev *p_os_reference
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
index 2d7d1c2..87f4385 100644
--- a/sound/pci/asihpi/hpios.c
+++ b/sound/pci/asihpi/hpios.c
@@ -43,7 +43,7 @@ void hpios_delay_micro_seconds(u32 num_micro_sec)
 
 On error, return -ENOMEM, and *pMemArea.size = 0
 */
-u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
+int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
 	struct pci_dev *pdev)
 {
 	/*?? any benefit in using managed dmam_alloc_coherent? */

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-30 14:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-28  6:57 [patch] ALSA: asihpi - fix return type of hpios_locked_mem_alloc() Dan Carpenter
2012-03-28 14:38 ` Takashi Iwai
2012-03-28 21:43 ` Eliot Blennerhassett
2012-03-29  5:33   ` Takashi Iwai
2012-03-29  5:56     ` Dan Carpenter
2012-03-29 20:52     ` [PATCH] ALSA: asihpi - fix return value " linux
2012-03-30 14:25       ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox