projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bb3ed2
)
gpio: tegra: add missing error handling to probe
author
Stephen Warren
<
[email protected]
>
Fri, 6 Dec 2013 20:36:11 +0000
(13:36 -0700)
committer
Linus Walleij
<
[email protected]
>
Wed, 11 Dec 2013 12:37:48 +0000
(13:37 +0100)
The call to gpiochip_add() is not currently error-checked. Add the
missing checking.
Signed-off-by: Stephen Warren <
[email protected]
>
Reviewed-by: Thierry Reding <
[email protected]
>
Reviewed-by: Alexandre Courbot <
[email protected]
>
Signed-off-by: Linus Walleij <
[email protected]
>
drivers/gpio/gpio-tegra.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-tegra.c
b/drivers/gpio/gpio-tegra.c
index cfd3b9037bc7f4647ada0b44cd4871701be4bce6..2b49f878b56c69c8f28897dbc5c99d59daa09f91 100644
(file)
--- a/
drivers/gpio/gpio-tegra.c
+++ b/
drivers/gpio/gpio-tegra.c
@@
-425,6
+425,7
@@
static int tegra_gpio_probe(struct platform_device *pdev)
struct tegra_gpio_soc_config *config;
struct resource *res;
struct tegra_gpio_bank *bank;
+ int ret;
int gpio;
int i;
int j;
@@
-494,7
+495,11
@@
static int tegra_gpio_probe(struct platform_device *pdev)
tegra_gpio_chip.of_node = pdev->dev.of_node;
- gpiochip_add(&tegra_gpio_chip);
+ ret = gpiochip_add(&tegra_gpio_chip);
+ if (ret < 0) {
+ irq_domain_remove(irq_domain);
+ return ret;
+ }
for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) {
int irq = irq_create_mapping(irq_domain, gpio);