projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2b5a40
)
spi: img-spfi: Fix pm_runtime_get_sync() error checking
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Fri, 22 Apr 2022 06:26:41 +0000
(06:26 +0000)
committer
Mark Brown
<broonie@kernel.org>
Fri, 22 Apr 2022 11:37:36 +0000
(12:37 +0100)
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>
drivers/spi/spi-img-spfi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-img-spfi.c
b/drivers/spi/spi-img-spfi.c
index
5f05d51
..
71376b6
100644
(file)
--- a/
drivers/spi/spi-img-spfi.c
+++ b/
drivers/spi/spi-img-spfi.c
@@
-731,7
+731,7
@@
static int img_spfi_resume(struct device *dev)
int ret;
ret = pm_runtime_get_sync(dev);
- if (ret) {
+ if (ret
< 0
) {
pm_runtime_put_noidle(dev);
return ret;
}