summaryrefslogtreecommitdiffstats
path: root/net/rfkill/rfkill-gpio.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-05-10 17:34:50 -0400
committerDavid S. Miller <davem@davemloft.net>2018-05-10 17:34:50 -0400
commitb2a9643855c320353723a08b9ee4a3bbd0301c1a (patch)
tree61cacf2ff831c2eb1cb6b28686a8864540b7c86d /net/rfkill/rfkill-gpio.c
parent09c8b9718a7af674036643fa2e0dbb2f09aba75e (diff)
parent914eac248d876f9c00cd1792ffec3d182c863f13 (diff)
downloadlinux-b2a9643855c320353723a08b9ee4a3bbd0301c1a.tar.bz2
Merge tag 'mac80211-for-davem-2018-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== We only have a few fixes this time: * WMM element validation * SAE timeout * add-BA timeout * docbook parsing * a few memory leaks in error paths ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rfkill/rfkill-gpio.c')
-rw-r--r--net/rfkill/rfkill-gpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index 41bd496531d4..00192a996be0 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -137,13 +137,18 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
ret = rfkill_register(rfkill->rfkill_dev);
if (ret < 0)
- return ret;
+ goto err_destroy;
platform_set_drvdata(pdev, rfkill);
dev_info(&pdev->dev, "%s device registered.\n", rfkill->name);
return 0;
+
+err_destroy:
+ rfkill_destroy(rfkill->rfkill_dev);
+
+ return ret;
}
static int rfkill_gpio_remove(struct platform_device *pdev)