Re: [PATCH] Input: da7280 - delete a stray tab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 16, 2020 at 10:51:23AM +0000, Roy Im wrote:
> On Wednesday, December 16, 2020 5:33 PM, Dan Carpenter wrote: 
> 
> > This line is indented one tab too far.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > ---
> 
> Thanks for the patch but it is already fixed by Dmitry as below.
> ---
> An "if" testing for error condition has accidentally been dropped from the code.
> 		error = device_property_read_string(dev, gpi_str3, &str);
> +		if (!error)
>  			haptics->gpi_ctl[i].polarity =
>  				da7280_haptic_of_gpi_pol_str(dev, str);
> 

Huh...  Well, at least the kbuild bot discovered this using the Smatch
warning for inconsistent indenting so that's nice.

https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx/thread/IB3H2KDL2HZ5WGNAER7TLCJQHZJH7S7E/

This is one of the first real bugs that that indenting has found, maybe
if Smatch had used some more of the context clues the warning could have
been made better.

Presumably W=1 and some of the other analysis tools would have warned
about the unused "error = " assignment if we had waited another day.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux