Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Li Zefan and committed by
David S. Miller
134d99e3 44344b2a

+2
+2
drivers/connector/connector.c
··· 145 145 if (queue_work(dev->cbdev->cn_queue, 146 146 &__cbq->work)) 147 147 err = 0; 148 + else 149 + err = -EINVAL; 148 150 } else { 149 151 struct cn_callback_data *d; 150 152