Skip to content

Commit 245f6f4

Browse files
committed
media: atomisp: simplify asd check on open() fops
The open() fops support two types of devices: "acc" and normal ones. the acc works on a different way, using a different pipe struct. Not sure yet if it would make sense to setup a run_mode there. Also, As default_run_mode exists only on normal modes, we can simplify the logic to check if the device is in normal mode. That solves this warning: ../drivers/staging/media/atomisp/pci/atomisp_fops.c:904 atomisp_open() warn: variable dereferenced before check 'asd' (see line 807) Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 71665d8 commit 245f6f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/staging/media/atomisp/pci/atomisp_fops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static int atomisp_open(struct file *file)
901901
rt_mutex_unlock(&isp->mutex);
902902

903903
/* Ensure that a mode is set */
904-
if (asd && pipe)
904+
if (!acc_node)
905905
v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode);
906906

907907
return 0;

0 commit comments

Comments
 (0)