]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: tegra: Check errors for both positive and negative values
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:19:09 +0000 (01:19 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:44 +0000 (22:57 +0200)
commita0860f2189feec7b7503888dc0f68d81407575c9
tree931eb7d5cf39f103b084fcdc5f933d521c6abbc3
parent0f74d8a1d8056647097854ba570f43aa47257425
i2c: tegra: Check errors for both positive and negative values

The driver's code is inconsistent in regards to the error values checking.
The correct way should be to check both positive and negative values.
This patch cleans up the error-checks in the code. Note that the
pm_runtime_get_sync() could return positive value on success, hence only
relevant parts of the code are changed by this patch.

Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c