projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09a38ab
)
staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device
author
J. German Rivera
<
[email protected]
>
Sat, 17 Oct 2015 16:18:22 +0000
(11:18 -0500)
committer
Greg Kroah-Hartman
<
[email protected]
>
Sun, 18 Oct 2015 03:53:38 +0000
(20:53 -0700)
Check that resource is not NULL before de-referencing it.
Signed-off-by: J. German Rivera <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/fsl-mc/bus/mc-allocator.c
patch
|
blob
|
history
diff --git
a/drivers/staging/fsl-mc/bus/mc-allocator.c
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index a45293bfce5ac6f9ff830b3c126bd00d4a9b537e..88d1857521a530c07e50c626b91a67f0dc86f315 100644
(file)
--- a/
drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/
drivers/staging/fsl-mc/bus/mc-allocator.c
@@
-111,7
+111,7
@@
static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
goto out;
resource = mc_dev->resource;
- if (WARN_ON(resource->data != mc_dev))
+ if (WARN_ON(
!resource ||
resource->data != mc_dev))
goto out;
mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);