From: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx> Fixes the following smatch warning: drivers/scsi/ips.c:6901 ips_init_phase1() warn: returning -1 instead of -ENOMEM is sloppy. Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx> Fixes: dd00cc486ab1 ("some kmalloc/memset ->kzalloc (tree wide)") Signed-off-by: chongjiapeng <jiapeng.chong@xxxxxxxxxxxxxxxxx> --- drivers/scsi/ips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 498bf04499ce..2ce97f407d18 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -6898,7 +6898,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr) if (ha == NULL) { IPS_PRINTK(KERN_WARNING, pci_dev, "Unable to allocate temporary ha struct\n"); - return -1; + return -ENOMEM; } ips_sh[index] = NULL; -- 2.19.1.6.gb485710b