Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a84d794d authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Christoph Hellwig
Browse files

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

parent 24a4b078
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2430,7 +2430,7 @@ static int hpsa_get_device_id(struct ctlr_info *h, unsigned char *scsi3addr,
		buflen = 16;
	buf = kzalloc(64, GFP_KERNEL);
	if (!buf)
		return -1;
		return -ENOMEM;
	rc = hpsa_scsi_do_inquiry(h, scsi3addr, VPD_PAGE | 0x83, buf, 64);
	if (rc == 0)
		memcpy(device_id, &buf[8], buflen);