Skip to contentSkip to conversation

soc_button_array: fix a crash during rmmod

PATCH Applied Zhu, Lejun 2 participants 2 messages Apr 22, 2014 – Apr 23, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zhu, Lejun

author
#1 lore raw

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().

---
 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
maintainer Applied
#2 lore raw
Quoted 5 lines · Lejun

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().

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
index 08ead2a..20c80f5 100644
@@ -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