NFC: pn533: fix order of initialization
Correctly call nfc_set_parent_dev before nfc_register_device. Otherwise the driver will OOPS when being removed. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:

committed by
Samuel Ortiz

parent
79f09fa79c
commit
b16931b13c
@@ -536,7 +536,7 @@ static int pn533_usb_probe(struct usb_interface *interface,
|
||||
|
||||
priv = pn533_register_device(id->driver_info, protocols, protocol_type,
|
||||
phy, &usb_phy_ops, fops,
|
||||
&phy->udev->dev);
|
||||
&phy->udev->dev, &interface->dev);
|
||||
|
||||
if (IS_ERR(priv)) {
|
||||
rc = PTR_ERR(priv);
|
||||
@@ -544,7 +544,6 @@ static int pn533_usb_probe(struct usb_interface *interface,
|
||||
}
|
||||
|
||||
phy->priv = priv;
|
||||
nfc_set_parent_dev(priv->nfc_dev, &interface->dev);
|
||||
|
||||
usb_set_intfdata(interface, phy);
|
||||
|
||||
|
Reference in New Issue
Block a user