* [PATCH 5/5] CONNECTOR: return proper error code in cn_call_callback()
@ 2008-01-04 5:53 Li Zefan
2008-01-04 9:51 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2008-01-04 5:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: Evgeniy Polyakov, LKML
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>
---
drivers/connector/connector.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 865303b..37976dc 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -146,6 +146,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;
--
1.5.3.rc7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 5/5] CONNECTOR: return proper error code in cn_call_callback()
2008-01-04 5:53 [PATCH 5/5] CONNECTOR: return proper error code in cn_call_callback() Li Zefan
@ 2008-01-04 9:51 ` David Miller
2008-01-05 15:24 ` Evgeniy Polyakov
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2008-01-04 9:51 UTC (permalink / raw)
To: lizf; +Cc: akpm, johnpol, linux-kernel
From: Li Zefan <lizf@cn.fujitsu.com>
Date: Fri, 04 Jan 2008 13:53:05 +0800
> 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>
This one is a bug fix so I'll apply it to net-2.6 and push
to Linus.
The rest are cleanups which I'll queue up for 2.6.25
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/5] CONNECTOR: return proper error code in cn_call_callback()
2008-01-04 9:51 ` David Miller
@ 2008-01-05 15:24 ` Evgeniy Polyakov
0 siblings, 0 replies; 3+ messages in thread
From: Evgeniy Polyakov @ 2008-01-05 15:24 UTC (permalink / raw)
To: David Miller; +Cc: lizf, akpm, linux-kernel
Hi.
Sorry for long reply.
On Fri, Jan 04, 2008 at 01:51:25AM -0800, David Miller (davem@davemloft.net) wrote:
> > 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>
>
> This one is a bug fix so I'll apply it to net-2.6 and push
> to Linus.
>
> The rest are cleanups which I'll queue up for 2.6.25
Although I'm not sure changing error from nodev to inval is a bug fix :),
I have no problem with pushing it first.
Loop above will break out after first matched id, so it will never call
the path, which can change error, again.
Thanks a lot for patches and quick merge!
--
Evgeniy Polyakov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-05 15:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 5:53 [PATCH 5/5] CONNECTOR: return proper error code in cn_call_callback() Li Zefan
2008-01-04 9:51 ` David Miller
2008-01-05 15:24 ` Evgeniy Polyakov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).