]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: designware: Drop unneeded condition in i2c_dw_validate_speed()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 19 May 2020 12:50:40 +0000 (15:50 +0300)
committerWolfram Sang <wsa@kernel.org>
Fri, 22 May 2020 14:50:30 +0000 (16:50 +0200)
commit4966a2f6e7c8962308e97ce93fcd4220c36f9db6
tree9b9a9a95d618b28a9ba5d034c3b30caa31873771
parent38d4f6fbf89fc32dbae7302592b2a66531a02e70
i2c: designware: Drop unneeded condition in i2c_dw_validate_speed()

We may bailout directly from the loop instead of breaking it and
testing a loop counter. This also gives advantages such as decreased
indentation level along with dropped unneeded condition.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-designware-common.c