The ap_queue_messsage function will call device_unregister if the
unregistered field of the device has been set while trying to queue
a message. This races with other device_unregister calls, e.g. from
the ap_scan_bus. Remove the call to device_unregister from
ap_queue_message and let ap_scan_bus deal with it.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
rc = -ENODEV;
}
spin_unlock_bh(&ap_dev->lock);
- if (rc == -ENODEV)
- device_unregister(&ap_dev->device);
}
EXPORT_SYMBOL(ap_queue_message);