aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/xpad.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index d1c0e720d3f5..b29e3affb805 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -405,9 +405,11 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha
405static void xpad_irq_in(struct urb *urb) 405static void xpad_irq_in(struct urb *urb)
406{ 406{
407 struct usb_xpad *xpad = urb->context; 407 struct usb_xpad *xpad = urb->context;
408 int retval; 408 int retval, status;
409 409
410 switch (urb->status) { 410 status = urb->status;
411
412 switch (status) {
411 case 0: 413 case 0:
412 /* success */ 414 /* success */
413 break; 415 break;
@@ -416,11 +418,11 @@ static void xpad_irq_in(struct urb *urb)
416 case -ESHUTDOWN: 418 case -ESHUTDOWN:
417 /* this urb is terminated, clean up */ 419 /* this urb is terminated, clean up */
418 dbg("%s - urb shutting down with status: %d", 420 dbg("%s - urb shutting down with status: %d",
419 __FUNCTION__, urb->status); 421 __FUNCTION__, status);
420 return; 422 return;
421 default: 423 default:
422 dbg("%s - nonzero urb status received: %d", 424 dbg("%s - nonzero urb status received: %d",
423 __FUNCTION__, urb->status); 425 __FUNCTION__, status);
424 goto exit; 426 goto exit;
425 } 427 }
426 428
@@ -462,9 +464,11 @@ static void xpad_bulk_out(struct urb *urb)
462#if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) 464#if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS)
463static void xpad_irq_out(struct urb *urb) 465static void xpad_irq_out(struct urb *urb)
464{ 466{
465 int retval; 467 int retval, status;
466 468
467 switch (urb->status) { 469 status = urb->status;
470
471 switch (status) {
468 case 0: 472 case 0:
469 /* success */ 473 /* success */
470 break; 474 break;
@@ -473,11 +477,11 @@ static void xpad_irq_out(struct urb *urb)
473 case -ESHUTDOWN: 477 case -ESHUTDOWN:
474 /* this urb is terminated, clean up */ 478 /* this urb is terminated, clean up */
475 dbg("%s - urb shutting down with status: %d", 479 dbg("%s - urb shutting down with status: %d",
476 __FUNCTION__, urb->status); 480 __FUNCTION__, status);
477 return; 481 return;
478 default: 482 default:
479 dbg("%s - nonzero urb status received: %d", 483 dbg("%s - nonzero urb status received: %d",
480 __FUNCTION__, urb->status); 484 __FUNCTION__, status);
481 goto exit; 485 goto exit;
482 } 486 }
483 487