Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[firefly-linux-kernel-4.4.55.git] / drivers / gpio / gpio-generic.c
index 42d470632aea1c865766cbef39b005532fb13864..d2196bf738471fff1de061a2bbbeafee95b444f3 100644 (file)
@@ -390,11 +390,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc,
 
 int bgpio_remove(struct bgpio_chip *bgc)
 {
-       int err = gpiochip_remove(&bgc->gc);
-
-       kfree(bgc);
-
-       return err;
+       return gpiochip_remove(&bgc->gc);
 }
 EXPORT_SYMBOL_GPL(bgpio_remove);