mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[PATCH] pcmcia: fix pcmcia_device_remove oops
Fix pcmcia_device_remove NULL pointer dereference at shutdown. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
30bac7aa0e
commit
b2f51a1cb4
1 changed files with 1 additions and 1 deletions
|
@ -464,7 +464,7 @@ static int pcmcia_device_remove(struct device * dev)
|
||||||
* all devices
|
* all devices
|
||||||
*/
|
*/
|
||||||
did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
|
did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
|
||||||
if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
|
if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
|
||||||
(p_dev->socket->device_count != 0) &&
|
(p_dev->socket->device_count != 0) &&
|
||||||
(p_dev->device_no == 0))
|
(p_dev->device_no == 0))
|
||||||
pcmcia_card_remove(p_dev->socket, p_dev);
|
pcmcia_card_remove(p_dev->socket, p_dev);
|
||||||
|
|
Loading…
Reference in a new issue