diff options
-rw-r--r-- | drivers/input/joystick/xpad.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 0380597249bb..2854c8fc334b 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -339,9 +339,11 @@ static void xpad360_process_packet(struct usb_xpad *xpad, | |||
339 | static void xpad_irq_in(struct urb *urb) | 339 | static void xpad_irq_in(struct urb *urb) |
340 | { | 340 | { |
341 | struct usb_xpad *xpad = urb->context; | 341 | struct usb_xpad *xpad = urb->context; |
342 | int retval; | 342 | int retval, status; |
343 | 343 | ||
344 | switch (urb->status) { | 344 | status = urb->status; |
345 | |||
346 | switch (status) { | ||
345 | case 0: | 347 | case 0: |
346 | /* success */ | 348 | /* success */ |
347 | break; | 349 | break; |
@@ -350,11 +352,11 @@ static void xpad_irq_in(struct urb *urb) | |||
350 | case -ESHUTDOWN: | 352 | case -ESHUTDOWN: |
351 | /* this urb is terminated, clean up */ | 353 | /* this urb is terminated, clean up */ |
352 | dbg("%s - urb shutting down with status: %d", | 354 | dbg("%s - urb shutting down with status: %d", |
353 | __FUNCTION__, urb->status); | 355 | __FUNCTION__, status); |
354 | return; | 356 | return; |
355 | default: | 357 | default: |
356 | dbg("%s - nonzero urb status received: %d", | 358 | dbg("%s - nonzero urb status received: %d", |
357 | __FUNCTION__, urb->status); | 359 | __FUNCTION__, status); |
358 | goto exit; | 360 | goto exit; |
359 | } | 361 | } |
360 | 362 | ||
@@ -373,9 +375,11 @@ exit: | |||
373 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) | 375 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) |
374 | static void xpad_irq_out(struct urb *urb) | 376 | static void xpad_irq_out(struct urb *urb) |
375 | { | 377 | { |
376 | int retval; | 378 | int retval, status; |
379 | |||
380 | status = urb->status; | ||
377 | 381 | ||
378 | switch (urb->status) { | 382 | switch (status) { |
379 | case 0: | 383 | case 0: |
380 | /* success */ | 384 | /* success */ |
381 | break; | 385 | break; |
@@ -384,11 +388,11 @@ static void xpad_irq_out(struct urb *urb) | |||
384 | case -ESHUTDOWN: | 388 | case -ESHUTDOWN: |
385 | /* this urb is terminated, clean up */ | 389 | /* this urb is terminated, clean up */ |
386 | dbg("%s - urb shutting down with status: %d", | 390 | dbg("%s - urb shutting down with status: %d", |
387 | __FUNCTION__, urb->status); | 391 | __FUNCTION__, status); |
388 | return; | 392 | return; |
389 | default: | 393 | default: |
390 | dbg("%s - nonzero urb status received: %d", | 394 | dbg("%s - nonzero urb status received: %d", |
391 | __FUNCTION__, urb->status); | 395 | __FUNCTION__, status); |
392 | goto exit; | 396 | goto exit; |
393 | } | 397 | } |
394 | 398 | ||