of: of_reserved_mem: Provide return values
PATCH v2 1/1 of: of_reserved_mem: Provide return values
From: Fabio Estevam <[email protected]>
Commit 1a29544cc8c9 ("drivers: of: add return value to of_reserved_mem_device_init") missed to update the return values in the error cases, causing the following build warnings:
drivers/of/of_reserved_mem.c: In function 'of_reserved_mem_device_init':drivers/of/of_reserved_mem.c:253:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type] drivers/of/of_reserved_mem.c:259:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
Provide proper return values.
Reported-by Stephen Rothwell <[email protected]>
Signed-off-by Fabio Estevam <[email protected]>
---
Changes since v1:
- Fix typo in the Reported-by tag
drivers/of/of_reserved_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/of/of_reserved_mem.c +2 -2
@@ -250,13 +250,13 @@ int of_reserved_mem_device_init(struct device *dev) np =of_parse_phandle (dev->of_node,"memory-region" ,0 );if (!np) -return ; +return -ENODEV ; rmem =__find_rmem (np);of_node_put (np);if (!rmem || !rmem->ops || !rmem->ops->device_init) -return ; +return -ENOMEM ; rmem->ops->device_init (rmem, dev);dev_info (dev,"assigned reserved memory node %s\n" , rmem->name);
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html