Skip to content

Commit

Permalink
uwb: fix error handling
Browse files Browse the repository at this point in the history
Fatal errors such as a device disconnect must not trigger
error handling. The error returns must be checked.

Signed-off-by: Oliver Neukum <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Oliver Neukum authored and gregkh committed Apr 18, 2012
1 parent 9426cd0 commit 5bd7b41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/uwb/hwa-rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,8 @@ void hwarc_neep_cb(struct urb *urb)
dev_err(dev, "NEEP: URB error %d\n", urb->status);
}
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result < 0) {
if (result < 0 && result != -ENODEV && result != -EPERM) {
/* ignoring unrecoverable errors */
dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n",
result);
goto error;
Expand Down

0 comments on commit 5bd7b41

Please sign in to comment.