soc_button_array: fix a crash during rmmod
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 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 <[email protected]>
--- drivers/input/misc/soc_button_array.c | 1 + 1 file changed, 1 insertion(+)
(quoted diff) +0 -0
b/drivers/input/misc/soc_button_array.c
index 08ead2a..20c80f5 100644
drivers/input/misc/soc_button_array.c +1 -0
@@ -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;
Signature · 1 line
1.8.3.2
Quoted 5 lines · Lejun
When the system has zero or one button available, trying to rmmod
soc_button_arraywill cause crash. Fix this by properly handling-ENODEVinprobe().Signed-off-by Lejun Zhu <[email protected]>
Applied, thank you.
Quoted 38 lines
--- drivers/input/misc/soc_button_array.c | 1 + 1 file changed, 1 insertion(+)drivers/input/misc/soc_button_array.c +1
-0@@ -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;Signature · 1 line
1.8.3.2
Signature · 1 line
Dmitry