aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga
diff options
context:
space:
mode:
authorTien Fong Chee2019-02-15 15:57:07 +0800
committerMichal Simek2019-04-16 11:51:33 +0200
commit3003c445b3cb1d1ca7e2304bfa3e2faf2ae02f80 (patch)
treef412af2514b53ac4eef2cd7ae1f8e07e05f91188 /drivers/fpga
parent9184c92f46da7a0cd53a806046e56911b61c90e2 (diff)
fpga: Replace char * with const char * for filename
Ensure the string for filename is always constant, otherwise it can be corrupted by the writing. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/fpga')
-rw-r--r--drivers/fpga/zynqpl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 499310d0c0b..683cf14b47e 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -421,7 +421,8 @@ static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
loff_t blocksize, actread;
loff_t pos = 0;
int fstype;
- char *interface, *dev_part, *filename;
+ char *interface, *dev_part;
+ const char *filename;
blocksize = fsinfo->blocksize;
interface = fsinfo->interface;