Input: xpad - fix check for succesful usb_buffer_alloc
Signed-off-by: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 0c04a26..067ed8d 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -407,7 +407,7 @@
xpad->odata = usb_buffer_alloc(xpad->udev, XPAD_PKT_LEN,
GFP_ATOMIC, &xpad->odata_dma );
- if (!xpad->idata)
+ if (!xpad->odata)
goto fail1;
xpad->irq_out = usb_alloc_urb(0, GFP_KERNEL);