Commit 7740fc52 authored by Lejun Zhu's avatar Lejun Zhu Committed by Dmitry Torokhov
Browse files

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: default avatarLejun Zhu <lejun.zhu@linux.intel.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 46a2986e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -169,6 +169,7 @@ static int soc_button_pnp_probe(struct pnp_dev *pdev,
				soc_button_remove(pdev);
				soc_button_remove(pdev);
				return error;
				return error;
			}
			}
			continue;
		}
		}


		priv->children[i] = pd;
		priv->children[i] = pd;