]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Tue, 14 Jun 2022 14:59:20 +0000 (16:59 +0200)
commite663ce18cafc55338da57daf2f756bef43d967e1
treec98f69374cb4b91be24174849ae3a9801789e264
parentc92ec22a991778a096342cf1a917ae36c5c86a90
spi: img-spfi: Fix pm_runtime_get_sync() error checking

[ Upstream commit cc470d55343056d6b2a5c32e10e0aad06f324078 ]

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: deba25800a12b ("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