GPIO framework checks for NULL pointer when gpiod_set_value() is called.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
{
struct gmin_subdev *gs = find_gmin_subdev(subdev);
- if (gs && gs->gpio0) {
+ if (gs) {
gpiod_set_value(gs->gpio0, on);
return 0;
}
{
struct gmin_subdev *gs = find_gmin_subdev(subdev);
- if (gs && gs->gpio1) {
+ if (gs) {
gpiod_set_value(gs->gpio1, on);
return 0;
}