We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50bec7f commit cb2381cCopy full SHA for cb2381c
drivers/regulator/rt4801-regulator.c
@@ -66,7 +66,7 @@ static int rt4801_enable(struct regulator_dev *rdev)
66
struct gpio_descs *gpios = priv->enable_gpios;
67
int id = rdev_get_id(rdev), ret;
68
69
- if (gpios->ndescs <= id) {
+ if (!gpios || gpios->ndescs <= id) {
70
dev_warn(&rdev->dev, "no dedicated gpio can control\n");
71
goto bypass_gpio;
72
}
@@ -88,7 +88,7 @@ static int rt4801_disable(struct regulator_dev *rdev)
88
89
int id = rdev_get_id(rdev);
90
91
92
93
94
0 commit comments