ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 28 Mar 2012 06:57:02 +0000 (09:57 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Mar 2012 16:49:49 +0000 (18:49 +0200)
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/hpi_internal.h
sound/pci/asihpi/hpios.c

index 4cc315daeda0dcfcbd04d976aa6b7b02f13a1656..8c63200cf339631d9c18649c4a9f5195f650e9c9 100644 (file)
@@ -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
index 2d7d1c2e1d0d2553e8fbe180b7a41a66a9c4b2af..87f4385fe8c7f1a6b976734f0b56b19706d4d67b 100644 (file)
@@ -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? */