scsi: pm8001: remove unnecessary oom message
Subsystems (2)
PATCH 1/1 scsi: pm8001: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
--- drivers/scsi/pm8001/pm8001_sas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/pm8001/pm8001_sas.c +1 -3
@@ -118,10 +118,8 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, align_offset = (dma_addr_t )align -1 ; mem_virt_alloc =dma_alloc_coherent (&pdev->dev, mem_size + align, &mem_dma_handle,GFP_KERNEL ); -if (!mem_virt_alloc) { -pr_err ("pm80xx: memory allocation error\n" ); +if (!mem_virt_alloc)return -1 ; - } *pphys_addr = mem_dma_handle; phys_align = (*pphys_addr + align_offset) & ~align_offset; *virt_addr = (void *)mem_virt_alloc + phys_align - *pphys_addr;
Signature · 1 line
2.26.0.106.g9fadedd
Quoted 16 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
Signed-off-by Zhen Lei <[email protected]>--- drivers/scsi/pm8001/pm8001_sas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/scsi/pm8001/pm8001_sas.c +0
-0
drivers/scsi/pm8001/pm8001_sas.c int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, · line 124
Quoted 8 lines
drivers/scsi/pm8001/pm8001_sas.c +1
-3@@ -118,10 +118,8 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, align_offset = (dma_addr_t )align -1 ; mem_virt_alloc =dma_alloc_coherent (&pdev->dev, mem_size + align, &mem_dma_handle,GFP_KERNEL ); -if (!mem_virt_alloc) { -pr_err ("pm80xx: memory allocation error\n" ); +if (!mem_virt_alloc)return -1 ; - }
while you are at it, can you also fix the return code to -ENOMEM
Thanks.
Quoted 12 lines · Jinpu Wang
Quoted 11 lines · Zhen Lei
Fixes
scripts/checkpatch.plwarning:
WARNING: Possible unnecessary 'out of memory' messageRemove it can help us save a bit of memory.
Signed-off-by Zhen Lei <[email protected]>--- drivers/scsi/pm8001/pm8001_sas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 14 lines
drivers/scsi/pm8001/pm8001_sas.c int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, · line 124
Quoted 13 lines
drivers/scsi/pm8001/pm8001_sas.c +1
-3@@ -118,10 +118,8 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, align_offset = (dma_addr_t )align -1 ; mem_virt_alloc =dma_alloc_coherent (&pdev->dev, mem_size + align, &mem_dma_handle,GFP_KERNEL ); -if (!mem_virt_alloc) { -pr_err ("pm80xx: memory allocation error\n" ); +if (!mem_virt_alloc)return -1 ; - }while you are at it, can you also fix the return code to
-ENOMEM
OK, I will update it.
Quoted 6 lines
Thanks.
.