提交 6aebb3c6 编写于 作者: A Andy Shevchenko 提交者: Mauro Carvalho Chehab

media: staging: atomisp: Remove duplicate NULL-check

GPIO framework checks for NULL pointer when gpiod_set_value() is called.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 cae8b2e1
......@@ -394,7 +394,7 @@ static int gmin_gpio0_ctrl(struct v4l2_subdev *subdev, int on)
{
struct gmin_subdev *gs = find_gmin_subdev(subdev);
if (gs && gs->gpio0) {
if (gs) {
gpiod_set_value(gs->gpio0, on);
return 0;
}
......@@ -405,7 +405,7 @@ static int gmin_gpio1_ctrl(struct v4l2_subdev *subdev, int on)
{
struct gmin_subdev *gs = find_gmin_subdev(subdev);
if (gs && gs->gpio1) {
if (gs) {
gpiod_set_value(gs->gpio1, on);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册