diff options
author | Loic Prylli <lprylli@netflix.com> | 2019-09-13 01:10:53 +0300 |
---|---|---|
committer | Loic Prylli <lprylli@netflix.com> | 2019-09-13 01:15:36 +0300 |
commit | 34a3942845ac3264ce27c648ae5486d302c3e6d8 (patch) | |
tree | 9f05c32d5b34582a2bce63b5c73da01d03667e22 /meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch | |
parent | 35e295e2a161fcf146ea031de53431b2888521fa (diff) | |
download | openbmc-34a3942845ac3264ce27c648ae5486d302c3e6d8.tar.xz |
gpio: aspeed: fix check for pointer return value
If dts does not have a pinctrl passthrough property,
the kernel would oops or misbehave before the fix.
Diffstat (limited to 'meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch')
-rw-r--r-- | meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch new file mode 100644 index 000000000..ef225bbf3 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0007-gpio-aspeed-fix-check-for-pointer-return-value.patch @@ -0,0 +1,24 @@ +From f15444796465b2d1514933c20a44417f4a09a2fd Mon Sep 17 00:00:00 2001 +From: Loic Prylli <lprylli@netflix.com> +Date: Thu, 12 Sep 2019 14:16:07 -0700 +Subject: [PATCH] gpio: aspeed: fix check for pointer return value + +If dts does not have a pinctrl passthrough property, +the kernel would oops or misbehave before the fix. +--- + drivers/gpio/gpio-aspeed.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c +index d4aaf7fa8e4b..26f487296365 100644 +--- a/drivers/gpio/gpio-aspeed.c ++++ b/drivers/gpio/gpio-aspeed.c +@@ -1205,7 +1205,7 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev) + * of the GPIO pins, so they can be requested at runtime. + */ + pinctrl = pinctrl_get_select(&pdev->dev, "pass-through"); +- if (pinctrl) ++ if (!IS_ERR(pinctrl)) + pinctrl_put(pinctrl); + + /* |