Commit c637f1fa authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

uas: fix error handling during scsi_scan()

intfdata is set only after scsi_scan(). uas_pre_reset() however
needs intfdata to be valid and will follow the NULL pointer
killing khubd. intfdata must be preemptively set before the
host is registered and undone in the error case.
Signed-off-by: default avatarOliver Neukum <>
Reviewed-by: default avatarHans de Goede <>
Acked-by: default avatarHans de Goede <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent e7eda932
......@@ -1096,16 +1096,17 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (result)
goto free_streams;
usb_set_intfdata(intf, shost);
result = scsi_add_host(shost, &intf->dev);
if (result)
goto free_streams;
usb_set_intfdata(intf, shost);
return result;
usb_set_intfdata(intf, NULL);
usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0);
if (shost)
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