Skip to content

Commit

Permalink
[CONNECTOR]: Return proper error code in cn_call_callback()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Li Zefan authored and davem330 committed Jan 4, 2008
1 parent 44344b2 commit 134d99e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 134d99e

Please sign in to comment.