aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_ctl.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_ctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index 28b4e8139153..a368d77b8d41 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,
395 payload.offset = 0; 395 payload.offset = 0;
396 payload.length = 4096; 396 payload.length = 4096;
397 payload.func_specific = kzalloc(4096, GFP_KERNEL); 397 payload.func_specific = kzalloc(4096, GFP_KERNEL);
398 if (!payload.func_specific)
399 return -ENOMEM;
398 PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload); 400 PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload);
399 wait_for_completion(&completion); 401 wait_for_completion(&completion);
400 virt_addr = pm8001_ha->memoryMap.region[NVMD].virt_ptr; 402 virt_addr = pm8001_ha->memoryMap.region[NVMD].virt_ptr;
@@ -402,6 +404,7 @@ static ssize_t pm8001_ctl_bios_version_show(struct device *cdev,
402 bios_index++) 404 bios_index++)
403 str += sprintf(str, "%c", 405 str += sprintf(str, "%c",
404 *((u8 *)((u8 *)virt_addr+bios_index))); 406 *((u8 *)((u8 *)virt_addr+bios_index)));
407 kfree(payload.func_specific);
405 return str - buf; 408 return str - buf;
406} 409}
407static DEVICE_ATTR(bios_version, S_IRUGO, pm8001_ctl_bios_version_show, NULL); 410static DEVICE_ATTR(bios_version, S_IRUGO, pm8001_ctl_bios_version_show, NULL);
@@ -729,7 +732,7 @@ static ssize_t pm8001_show_update_fw(struct device *cdev,
729 flash_error_table[i].reason); 732 flash_error_table[i].reason);
730} 733}
731 734
732static DEVICE_ATTR(update_fw, S_IRUGO|S_IWUGO, 735static DEVICE_ATTR(update_fw, S_IRUGO|S_IWUSR|S_IWGRP,
733 pm8001_show_update_fw, pm8001_store_update_fw); 736 pm8001_show_update_fw, pm8001_store_update_fw);
734struct device_attribute *pm8001_host_attrs[] = { 737struct device_attribute *pm8001_host_attrs[] = {
735 &dev_attr_interface_rev, 738 &dev_attr_interface_rev,