diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-26 14:54:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-04 07:36:27 -0400 |
commit | 8b1a2468cf8afcf2f2e0a113a32bef4a42298cff (patch) | |
tree | e48327c2923b3787b0c36844725bc8ac4b584a62 /drivers | |
parent | 6dfc6a3f66fbeed1be8fb5a376339d3dcb7545c3 (diff) | |
download | op-kernel-dev-8b1a2468cf8afcf2f2e0a113a32bef4a42298cff.zip op-kernel-dev-8b1a2468cf8afcf2f2e0a113a32bef4a42298cff.tar.gz |
media: staging: atomisp: don't access a NULL var
Get rid of those warnings:
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:446 gmin_v1p2_ctrl() error: we previously assumed 'gs' could be null (see line 444)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:480 gmin_v1p8_ctrl() error: we previously assumed 'gs' could be null (see line 478)
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:516 gmin_v2p8_ctrl() error: we previously assumed 'gs' could be null (see line 514)
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c index d8b7183..be0c5e1 100644 --- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c @@ -441,7 +441,7 @@ static int gmin_v1p2_ctrl(struct v4l2_subdev *subdev, int on) { struct gmin_subdev *gs = find_gmin_subdev(subdev); - if (gs && gs->v1p2_on == on) + if (!gs || gs->v1p2_on == on) return 0; gs->v1p2_on = on; @@ -475,7 +475,7 @@ static int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on) } } - if (gs && gs->v1p8_on == on) + if (!gs || gs->v1p8_on == on) return 0; gs->v1p8_on = on; @@ -511,7 +511,7 @@ static int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on) } } - if (gs && gs->v2p8_on == on) + if (!gs || gs->v2p8_on == on) return 0; gs->v2p8_on = on; |