From 134d99e302618eeb102c2a5be1f9e98696288bdd Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Fri, 4 Jan 2008 01:52:02 -0800 Subject: [PATCH] [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 Signed-off-by: David S. Miller --- drivers/connector/connector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 6883fcb79ad..bf9716b7551 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -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; -- 2.41.1