From: Lejun Zhu Date: Wed, 23 Apr 2014 05:47:13 +0000 (-0700) Subject: Input: soc_button_array - fix a crash during rmmod X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7740fc52105c9e6d2beac389a9ae0ce7138cf5ab;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Input: soc_button_array - fix a crash during rmmod When the system has zero or one button available, trying to rmmod soc_button_array will cause crash. Fix this by properly handling -ENODEV in probe(). Signed-off-by: Lejun Zhu Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 08ead2aaede5..20c80f543d5e 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -169,6 +169,7 @@ static int soc_button_pnp_probe(struct pnp_dev *pdev, soc_button_remove(pdev); return error; } + continue; } priv->children[i] = pd;