summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_ctl.c
diff options
context:
space:
mode:
authorJames Bottomley <JBottomley@Parallels.com>2014-06-09 16:49:39 +0200
committerJames Bottomley <JBottomley@Parallels.com>2014-06-09 16:49:39 +0200
commitb4c43993f448d0e25fe40690d9e9c81a8ebda623 (patch)
tree7cc19990b0b00226ce3063d956790368bfe62ada /drivers/scsi/pm8001/pm8001_ctl.c
parentinclude/scsi/osd_protocol.h: remove unnecessary __constant (diff)
parentmvsas: Recognise device/subsystem 9485/9485 as 88SE9485 (diff)
downloadlinux-b4c43993f448d0e25fe40690d9e9c81a8ebda623.tar.xz
linux-b4c43993f448d0e25fe40690d9e9c81a8ebda623.zip
Merge remote-tracking branch 'scsi-queue/drivers-for-3.16' into for-linus
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_ctl.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_ctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index 28b4e8139153..fe5eee4d0a11 100644
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -395,6 +395,8 @@ static ssize_t pm8001_ctl_bios_version_show(struct device *cdev,
payload.offset = 0;
payload.length = 4096;
payload.func_specific = kzalloc(4096, GFP_KERNEL);
+ if (!payload.func_specific)
+ return -ENOMEM;
PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload);
wait_for_completion(&completion);
virt_addr = pm8001_ha->memoryMap.region[NVMD].virt_ptr;
@@ -402,6 +404,7 @@ static ssize_t pm8001_ctl_bios_version_show(struct device *cdev,
bios_index++)
str += sprintf(str, "%c",
*((u8 *)((u8 *)virt_addr+bios_index)));
+ kfree(payload.func_specific);
return str - buf;
}
static DEVICE_ATTR(bios_version, S_IRUGO, pm8001_ctl_bios_version_show, NULL);