diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 13:56:47 +0300 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 13:56:47 +0300 |
commit | 6ea7e3873e52902af9ee8c0837450fdb69d54140 (patch) | |
tree | b291dad174446387a166763cfbf3dd351148ecbe /drivers/scsi/ipr.c | |
parent | 5ddfe0858ea7848c5d4efe3f4319e7543522e0ee (diff) | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
download | linux-6ea7e3873e52902af9ee8c0837450fdb69d54140.tar.xz |
Merge branch 'fixes-base' into fixes
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 3b3e0998fa6e..d6a691e27d33 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4002,6 +4002,7 @@ static ssize_t ipr_store_update_fw(struct device *dev, struct ipr_sglist *sglist; char fname[100]; char *src; + char *endline; int result, dnld_size; if (!capable(CAP_SYS_ADMIN)) @@ -4009,6 +4010,10 @@ static ssize_t ipr_store_update_fw(struct device *dev, snprintf(fname, sizeof(fname), "%s", buf); + endline = strchr(fname, '\n'); + if (endline) + *endline = '\0'; + if (request_firmware(&fw_entry, fname, &ioa_cfg->pdev->dev)) { dev_err(&ioa_cfg->pdev->dev, "Firmware file %s not found\n", fname); return -EIO; |