aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/platform.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 3f8077ce585c..ddeca142293c 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -103,6 +103,9 @@ struct resource *platform_get_resource_byname(struct platform_device *dev,
103 for (i = 0; i < dev->num_resources; i++) { 103 for (i = 0; i < dev->num_resources; i++) {
104 struct resource *r = &dev->resource[i]; 104 struct resource *r = &dev->resource[i];
105 105
106 if (unlikely(!r->name))
107 continue;
108
106 if (type == resource_type(r) && !strcmp(r->name, name)) 109 if (type == resource_type(r) && !strcmp(r->name, name))
107 return r; 110 return r;
108 } 111 }