aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/connector/connector.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-01-04 04:52:02 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-04 06:55:37 -0500
commit134d99e302618eeb102c2a5be1f9e98696288bdd (patch)
treec3f3b5e7e08d43b000d2dc2db31c4111bfb4ad40 /drivers/connector/connector.c
parent44344b2a85f03326c7047a8c861b0c625c674839 (diff)
[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>
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r--drivers/connector/connector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 6883fcb79ad3..bf9716b75513 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
145 if (queue_work(dev->cbdev->cn_queue, 145 if (queue_work(dev->cbdev->cn_queue,
146 &__cbq->work)) 146 &__cbq->work))
147 err = 0; 147 err = 0;
148 else
149 err = -EINVAL;
148 } else { 150 } else {
149 struct cn_callback_data *d; 151 struct cn_callback_data *d;
150 152