Re: [PATCH] iio: accel: bma400: integer underflow setting accel scale

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

 



On Wed, Jan 15, 2020 at 05:43:24PM +0000, Dan Robertson wrote:
> Thanks for taking a look at the code and your feedback on the driver!
> 
> On Wed, Jan 15, 2020 at 08:45:31PM +0300, Dan Carpenter wrote:
> > We put an upper bound on "val2" but we also need to prevent negative
> > values.
> 
> "val" is not used past the invalid value check. We only use "val" to make sure
> that it is in fact 0. AFAIK there is no "upper bound" on "val", it should be
> zero or we return -EINVAL. Am I missing something?

This patch affects "val2" not "val".  ;)

regards,
dan carpenter




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux