1
0
Fork 0

[CONNECTOR]: Return proper error code in cn_call_callback()

Error code should be set to EINVAL instead of ENODEV if !queue_work().
There's another call of queue_work() which may set err to EINVAL.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
wifi-calibration
Li Zefan 2008-01-04 01:52:02 -08:00 committed by David S. Miller
parent 44344b2a85
commit 134d99e302
1 changed files with 2 additions and 0 deletions

View File

@ -145,6 +145,8 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v
if (queue_work(dev->cbdev->cn_queue,
&__cbq->work))
err = 0;
else
err = -EINVAL;
} else {
struct cn_callback_data *d;