Skip to contentSkip to conversation

gpio-sch: Fix leak of resource

PATCH Linus Walleij 1 participant 1 message Jul 29, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Linus Walleij

author Applied
#1 lore raw
Quoted 13 lines · Alan Cox

From: Alan Cox <[email protected]>

---

 drivers/gpio/gpio-sch.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-sch.c +0 -0
index 424dce8..8707d45 100644

drivers/gpio/gpio-sch.c static int __devinit sch_gpio_probe(struct platform_device *pdev) · line 248

Quoted 9 lines
drivers/gpio/gpio-sch.c +2 -1
@@ -241,7 +241,8 @@ static int __devinit sch_gpio_probe(struct platform_device *pdev)
                        break;
 
                default:
-                       return -ENODEV;
+                       err = -ENODEV;
+                       goto err_sch_gpio_core;
        }
 
        sch_gpio_core.dev = &pdev->dev;

Applied to my fixes branch, CCing the list if there are complaints.

Yours,
Linus Walleij