Input: soc_button_array - fix a crash during rmmod
authorLejun Zhu <lejun.zhu@linux.intel.com>
Wed, 23 Apr 2014 05:47:13 +0000 (22:47 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 23 Apr 2014 05:56:36 +0000 (22:56 -0700)
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 <lejun.zhu@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/soc_button_array.c

index 08ead2aaede5d8ba8a324ff8157beb74d7984b2d..20c80f543d5e56fbe59f15403f2d64d9cb791cff 100644 (file)
@@ -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;