On 2021/6/10 16:59, Jinpu Wang wrote: > On Thu, Jun 10, 2021 at 10:20 AM Zhen Lei <thunder.leizhen@xxxxxxxxxx> wrote: >> >> Fixes scripts/checkpatch.pl warning: >> WARNING: Possible unnecessary 'out of memory' message >> >> Remove it can help us save a bit of memory. >> >> Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx> >> --- >> drivers/scsi/pm8001/pm8001_sas.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c >> index 6860d5a9ef83b44..fff01a6effc4dab 100644 >> --- a/drivers/scsi/pm8001/pm8001_sas.c >> +++ b/drivers/scsi/pm8001/pm8001_sas.c >> @@ -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. > > > Thanks. > > . >