Re: [PATCH v2 2/2] iio: (bma400) add driver for the BMA400

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

 



On Tue, Oct 15, 2019 at 12:25 AM kbuild test robot <lkp@xxxxxxxxx> wrote:

> smatch warnings:
> drivers/iio/accel/bma400_core.c:422 bma400_set_accel_oversampling_ratio() warn: unsigned 'acc_config' is never less than zero.

>    420                  ret = regmap_read(data->regmap, BMA400_ACC_CONFIG0_REG,
>    421                                    &acc_config);
>  > 422                  if (acc_config < 0)
>    423                          return acc_config;

Obvious typo, has to be if (ret < 0)

>    424
>    425                  ret = regmap_write(data->regmap, BMA400_ACC_CONFIG0_REG,
>    426                                     (acc_config & ~BMA400_LP_OSR_MASK) |
>    427                                     (val << BMA400_LP_OSR_SHIFT));
>    428                  if (ret < 0) {
>    429                          dev_err(data->dev, "Failed to write out OSR");
>    430                          return ret;
>    431                  }



-- 
With Best Regards,
Andy Shevchenko



[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