* [report] invalid error code in do_register_con_driver() console
@ 2016-02-25 21:34 Dan Carpenter
2016-05-03 14:26 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-02-25 21:34 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-kernel
Hi Jiri,
I'm getting the following static checker warning:
drivers/tty/vt/vt.c:3588 do_register_con_driver()
warn: missing error code here? 'csw->con_startup()' failed. 'retval' = '0'
drivers/tty/vt/vt.c
3582 if (retval)
3583 goto err;
3584
3585 desc = csw->con_startup();
3586
3587 if (!desc)
3588 goto err;
3589
3590 retval = -EINVAL;
3591
Probably, we could more the "retval = -EINVAL;" before the goto? I
don't think it's intentional?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [report] invalid error code in do_register_con_driver() console
2016-02-25 21:34 [report] invalid error code in do_register_con_driver() console Dan Carpenter
@ 2016-05-03 14:26 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2016-05-03 14:26 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-kernel
On 02/25/2016, 10:34 PM, Dan Carpenter wrote:
> Hi Jiri,
>
> I'm getting the following static checker warning:
>
> drivers/tty/vt/vt.c:3588 do_register_con_driver()
> warn: missing error code here? 'csw->con_startup()' failed. 'retval' = '0'
>
> drivers/tty/vt/vt.c
> 3582 if (retval)
> 3583 goto err;
> 3584
> 3585 desc = csw->con_startup();
> 3586
> 3587 if (!desc)
> 3588 goto err;
> 3589
> 3590 retval = -EINVAL;
> 3591
>
> Probably, we could more the "retval = -EINVAL;" before the goto? I
> don't think it's intentional?
Yes, you are right. I've prepared a fix to send out.
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-03 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 21:34 [report] invalid error code in do_register_con_driver() console Dan Carpenter
2016-05-03 14:26 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox