Commit 5ff98ae1 authored by Joel Schopp's avatar Joel Schopp Committed by Paul Mackerras

[PATCH] ppc64: of_device.c remove useless code

Coverity found more unused code.
Signed-off-by: default avatarJoel Schopp <jschopp@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 717522ff
...@@ -236,7 +236,6 @@ void of_device_unregister(struct of_device *ofdev) ...@@ -236,7 +236,6 @@ void of_device_unregister(struct of_device *ofdev)
struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id) struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id)
{ {
struct of_device *dev; struct of_device *dev;
u32 *reg;
dev = kmalloc(sizeof(*dev), GFP_KERNEL); dev = kmalloc(sizeof(*dev), GFP_KERNEL);
if (!dev) if (!dev)
...@@ -250,7 +249,6 @@ struct of_device* of_platform_device_create(struct device_node *np, const char * ...@@ -250,7 +249,6 @@ struct of_device* of_platform_device_create(struct device_node *np, const char *
dev->dev.bus = &of_platform_bus_type; dev->dev.bus = &of_platform_bus_type;
dev->dev.release = of_release_dev; dev->dev.release = of_release_dev;
reg = (u32 *)get_property(np, "reg", NULL);
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
if (of_device_register(dev) != 0) { if (of_device_register(dev) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment