]> git.baikalelectronics.ru Git - kernel.git/commit
memory: samsung: exynos5422-dmc: Do not ignore return code of regmap_read()
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 20 Jul 2020 11:03:01 +0000 (13:03 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Fri, 24 Jul 2020 07:42:44 +0000 (09:42 +0200)
commit991b8470836f4b7b064ac0bd3cdcd21f3028cd0a
tree1542119585f269111908c8f0e4505aa5416d9157
parent74a27a5f5a99e6b5adfd790053b6cccac3270c76
memory: samsung: exynos5422-dmc: Do not ignore return code of regmap_read()

Check for regmap_read() return code before using the read value in
following write in exynos5_switch_timing_regs().  Pass reading error
code to the callers.

This does not introduce proper error handling for such failed reads (and
obviously regmap_write() error is still ignored) because the driver
ignored this in all places.  Therefor it only fixes reported issue while
matching current driver coding style:

       drivers/memory/samsung/exynos5422-dmc.c: In function 'exynos5_switch_timing_regs':
    >> drivers/memory/samsung/exynos5422-dmc.c:216:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/memory/samsung/exynos5422-dmc.c