Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mike Miller <michael.miller@canonical.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Stephen M. Cameron and committed by
Christoph Hellwig
a84d794d 24a4b078

+1 -1
+1 -1
drivers/scsi/hpsa.c
··· 2430 2430 buflen = 16; 2431 2431 buf = kzalloc(64, GFP_KERNEL); 2432 2432 if (!buf) 2433 - return -1; 2433 + return -ENOMEM; 2434 2434 rc = hpsa_scsi_do_inquiry(h, scsi3addr, VPD_PAGE | 0x83, buf, 64); 2435 2435 if (rc == 0) 2436 2436 memcpy(device_id, &buf[8], buflen);