]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 26 Aug 2024 21:22:40 +0000 (00:22 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 3 Sep 2024 17:49:44 +0000 (18:49 +0100)
commitda83fd152e544c2222b2e098a3ce0f704617eb24
tree2e4db4760df311ae34f2bf7d694a7c3a070fc980
parent17601ab9d75918b11515b7f23730f99059cf038e
iio: imu: st_lsm6dsx: Remove useless dev_fwnode() calls

The device property APIs designed that way that they will return an error when
there is no valid fwnode provided. Moreover, the check for NULL of dev_fwnode()
is not fully correct as in some (currently rare) cases it may contain an error
pointer. This is not a problem anyway (see keyword 'valid' above) that's why
the code works properly even without this change.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://patch.msgid.link/20240826212344.866928-3-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c