[SPARC]: Fix bus_id[] string overflow.
dp->path_component_name can be larger than ->bus_id[] so use a different naming scheme for this stuff. Noticed by Jurij Smakov. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -651,7 +651,7 @@ build_resources:
|
||||
if (!parent)
|
||||
strcpy(op->dev.bus_id, "root");
|
||||
else
|
||||
strcpy(op->dev.bus_id, dp->path_component_name);
|
||||
sprintf(op->dev.bus_id, "%08x", dp->node);
|
||||
|
||||
if (of_device_register(op)) {
|
||||
printk("%s: Could not register of device.\n",
|
||||
|
Reference in New Issue
Block a user