aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-01-12 11:01:51 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-07-24 12:04:47 +0200
commita9004870d004b2002e6a5c2448a84ff3f887bb05 (patch)
treeb8b13055b536d64a3308efeb81730f1a96645d35
parent8cff2f6bbc6ce9f69aaf3d159f8e75e806f8bf8d (diff)
downloadkernel_samsung_smdk4412-a9004870d004b2002e6a5c2448a84ff3f887bb05.zip
kernel_samsung_smdk4412-a9004870d004b2002e6a5c2448a84ff3f887bb05.tar.gz
kernel_samsung_smdk4412-a9004870d004b2002e6a5c2448a84ff3f887bb05.tar.bz2
S5C73M3: Avoid writing the firmware to the filesystem
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--drivers/media/video/s5c73m3.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/media/video/s5c73m3.c b/drivers/media/video/s5c73m3.c
index 3529ad3..05450c4 100644
--- a/drivers/media/video/s5c73m3.c
+++ b/drivers/media/video/s5c73m3.c
@@ -579,7 +579,6 @@ static int s5c73m3_get_sensor_fw_binary(struct v4l2_subdev *sd)
u16 read_val;
int i, rxSize;
int err = 0;
- struct file *fp = NULL;
mm_segment_t old_fs;
long ret = 0;
char fw_path[25] = {0,};
@@ -730,17 +729,6 @@ retry:
set_fs(KERNEL_DS);
if (IntOriginalCRC == DataCRC) {
- fp = filp_open(fw_path, O_WRONLY|O_CREAT|O_TRUNC, 0644);
- if (IS_ERR(fp) || fp == NULL) {
- cam_err("failed to open %s, err %ld\n",
- fw_path, PTR_ERR(fp));
- err = -EINVAL;
- goto out;
- }
-
- ret = vfs_write(fp, (char __user *)data_memory,
- state->sensor_size, &fp->f_pos);
-
if (camfw_info[S5C73M3_SD_CARD].opened == 0) {
memcpy(state->phone_fw,
state->sensor_fw,
@@ -761,9 +749,6 @@ retry:
}
}
- if (fp != NULL)
- filp_close(fp, current->files);
-
out:
set_fs(old_fs);
return err;