Re: [PATCH 4/7] staging: cxt1e1: fix checkpatch error 'assignment in if condition'

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

 



Yes, it need to add brace in inner loop.
I will send again.

Thanks for review.
Daeseok Youn

2014-03-04 18:04 GMT+09:00, Dan Carpenter <dan.carpenter@xxxxxxxxxx>:
> On Tue, Mar 04, 2014 at 11:09:39AM +0900, Daeseok Youn wrote:
>> @@ -1174,7 +1179,8 @@ cleanup_hdlc(void)
>>  			ci = (ci_t *)(netdev_priv(hi->ndev));
>>  			for (j = 0; j < ci->max_port; j++)
>>  				for (k = 0; k < MUSYCC_NCHANS; k++)
>> -					if ((ndev = ci->port[j].chan[k]->user))
>> +					ndev = ci->port[j].chan[k]->user;
>> +					if (ndev)
>>  					{
>>  						do_deluser(ndev, 0);
>>  					}
>
>
> This patch introduces a bug here because the inner for loop now has two
> statement but no curly braces.
>
> regards,
> dan carpenter
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux