提交 3b79cc26 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

USB: unkill cxacru atm driver

it seems like you overdid it a bit in your quest to clean up the
use of urb->status. In this driver you read it the first thing, which
means that you are in a race against URB completion you'll
usually lose, returning -EINPROGRESS. This kills the driver.
Signed-off-by: NOliver Neukum <oneukum@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 04cab132
...@@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, ...@@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
int* actual_length) int* actual_length)
{ {
struct timer_list timer; struct timer_list timer;
int status = urb->status;
init_timer(&timer); init_timer(&timer);
timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT); timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
...@@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, ...@@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
if (actual_length) if (actual_length)
*actual_length = urb->actual_length; *actual_length = urb->actual_length;
return status; return urb->status; /* must read status after completion */
} }
static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册