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

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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment