]> git.baikalelectronics.ru Git - kernel.git/commit
spi: img-spfi: Fix pm_runtime_get_sync() error checking
authorZheng Yongjun <zhengyongjun3@huawei.com>
Fri, 22 Apr 2022 06:26:41 +0000 (06:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:48 +0000 (10:22 +0200)
commit1831bbcd5c3732b62f78d5e03c24432739c102a5
tree86888ba8caff68792aa82f78080a106319b3c7d7
parente59be28f799a983e9fc8d8133ddfbecc0e3726ea
spi: img-spfi: Fix pm_runtime_get_sync() error checking

[ Upstream commit cb039bbbb104daa52386e1f9cc3ca4077a0bfbda ]

If the device is already in a runtime PM enabled state
pm_runtime_get_sync() will return 1, so a test for negative
value should be used to check for errors.

Fixes: 26e4e694b20f8 ("spi: Add driver for IMG SPFI controller")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20220422062641.10486-1-zhengyongjun3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-img-spfi.c