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)
commit3b3b8e59d0144beb3e4c5dc29abfa1f89e6d4423
tree931eb7d5cf39f103b084fcdc5f933d521c6abbc3
parentd380d48ff376d6e98ce0c07a70487beb5d05cb4b
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