* linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?
@ 2015-08-09 21:30 David Binderman
2015-08-10 1:12 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2015-08-09 21:30 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi, linux-kernel
Hello there,
1.
[linux-4.2-rc6/drivers/extcon/extcon.c:153]: (style) Checking if unsigned variable 'id' is less than zero.
Source code is
id = find_cable_id_by_name(edev, name);
if (id < 0)
but
unsigned int id;
Suggest sanity check return value from find_cable_id_by_name
*before* assigning it into an unsigned variable.
2.
[linux-4.2-rc6/drivers/extcon/extcon.c:384]: (style) Checking if unsigned variable 'id' is less than zero.
Duplicate.
3.
[linux-4.2-rc6/drivers/extcon/extcon.c:432]: (style) Checking if unsigned variable 'id' is less than zero.
Another duplicate.
Regards
David Binderman
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-10 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-09 21:30 linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ? David Binderman
2015-08-10 1:12 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome