]> git.baikalelectronics.ru Git - kernel.git/commit
ata: brcm: fix reset controller API usage
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Jan 2020 22:15:00 +0000 (23:15 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 17 Jan 2020 04:49:09 +0000 (21:49 -0700)
commitcec10478649972de28d97de7e3faa0579fd8a291
tree86b2dd526ec09a8c36d545495946588922b62af2
parentc97342f41e65d8cfc37101b85b09b8e22322a3f8
ata: brcm: fix reset controller API usage

While fixing another issue in this driver I noticed it uses
IS_ERR_OR_NULL(), which is almost always a mistake.

Change the driver to use the proper devm_reset_control_get_optional()
interface instead and remove the checks except for the one that
checks for a failure in that function.

Fixes: 5ea75aa3cee8 ("ata: ahci_brcm: Allow optional reset controller to be used")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/ahci_brcm.c