]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: cdc: simplify return flow
authorIoana Ciornei <ciorneiioana@gmail.com>
Wed, 14 Oct 2015 19:34:27 +0000 (22:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 05:46:48 +0000 (22:46 -0700)
commit8e2afc610be0a8b70ce94324274beffb218a6fa0
treec8e464899e522665afe55da07ea88893494bd162
parent578219be6d01a10e2617fd3d461a47b2dc29aea3
staging: iio: cdc: simplify return flow

Simplify return flow ad7150_write_event_params in order to reduce code length.
Since i2c_smbus_write_word_data only returns a negative value or 0 the change is safe.

This patch fixes the following coccicheck warning:

drivers/staging/iio/cdc/ad7150.c:182:2-5: WARNING: end returns can be simpified if negative or 0 value

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/cdc/ad7150.c