# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.683 -> 1.684 # drivers/usb/hpusbscsi.c 1.7 -> 1.8 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/18 oliver@neukum.name 1.684 # [PATCH] hpusbscsi disconnect fix # # this fixes an oops that may happen if a device is used # after it is disconnected. # -------------------------------------------- # diff -Nru a/drivers/usb/hpusbscsi.c b/drivers/usb/hpusbscsi.c --- a/drivers/usb/hpusbscsi.c Wed Sep 18 16:34:06 2002 +++ b/drivers/usb/hpusbscsi.c Wed Sep 18 16:34:06 2002 @@ -396,6 +396,12 @@ ); hpusbscsi->scallback = callback; hpusbscsi->srb = srb; + + if (hpusbscsi->dev == NULL) { + srb->result = DID_ERROR; + callback(srb); + goto out; + } res = usb_submit_urb(&hpusbscsi->dataurb); if (res) {