瀏覽代碼

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>
Jan Kratochvil 18 年之前
父節點
當前提交
2e8335a629
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/input/joystick/xpad.c

+ 1 - 1
drivers/input/joystick/xpad.c

@@ -407,7 +407,7 @@ static int xpad_init_ff(struct usb_interface *intf, struct usb_xpad *xpad)
 
 	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);