summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/of_gpio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 18e015682276..10c2c5a38e4d 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -70,7 +70,8 @@ struct gpio_chip;
static inline int of_get_named_gpio_flags(struct device_node *np,
const char *list_name, int index, enum of_gpio_flags *flags)
{
- *flags = 0;
+ if (flags)
+ *flags = 0;
return -ENOSYS;
}