Re: linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?

2015-08-09 Thread Chanwoo Choi
Hi David, I knew this issue. So, I'll send following patch[1] to solve it for Linux 4.3 [1] http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next=4e491fe7920cb84dd0a2ea79800173ab1802fa22 Thanks, Chanwoo Choi On 08/10/2015 06:30 AM, David Binderman wrote: > Hello

linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?

2015-08-09 Thread David Binderman
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

linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?

2015-08-09 Thread David Binderman
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*

Re: linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?

2015-08-09 Thread Chanwoo Choi
Hi David, I knew this issue. So, I'll send following patch[1] to solve it for Linux 4.3 [1] http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-nextid=4e491fe7920cb84dd0a2ea79800173ab1802fa22 Thanks, Chanwoo Choi On 08/10/2015 06:30 AM, David Binderman wrote: Hello