projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b562b30
)
spi: spi-nxp-fspi: Fix a NULL vs IS_ERR() check in probe
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 12 Mar 2020 11:31:54 +0000
(14:31 +0300)
committer
Mark Brown
<broonie@kernel.org>
Thu, 12 Mar 2020 15:09:58 +0000
(15:09 +0000)
The platform_get_resource_byname() function returns NULL on error, it
doesn't return error pointers.
Fixes:
d166a73503ef
("spi: fspi: dynamically alloc AHB memory")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/20200312113154.GC20562@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-nxp-fspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-nxp-fspi.c
b/drivers/spi/spi-nxp-fspi.c
index
019f40e
..
1ccda82
100644
(file)
--- a/
drivers/spi/spi-nxp-fspi.c
+++ b/
drivers/spi/spi-nxp-fspi.c
@@
-1019,8
+1019,8
@@
static int nxp_fspi_probe(struct platform_device *pdev)
/* find the resources - controller memory mapped space */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fspi_mmap");
- if (
IS_ERR(res)
) {
- ret =
PTR_ERR(res)
;
+ if (
!res
) {
+ ret =
-ENODEV
;
goto err_put_ctrl;
}