gpio: max730x: Remove kfree(ts) in __max730x_remove()
authorAxel Lin <axel.lin@ingics.com>
Mon, 14 Apr 2014 07:30:41 +0000 (15:30 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 28 Apr 2014 19:35:09 +0000 (12:35 -0700)
The memory for ts is allocated by devm_kzalloc now, so the kfree is not
required.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max730x.c

index 8672755..0814584 100644 (file)
@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev)
        ts->write(dev, 0x04, 0x00);
 
        ret = gpiochip_remove(&ts->chip);
-       if (!ret) {
+       if (!ret)
                mutex_destroy(&ts->lock);
-               kfree(ts);
-       } else
+       else
                dev_err(dev, "Failed to remove GPIO controller: %d\n", ret);
 
        return ret;