Skip to content

Commit

Permalink
PNP / ACPI: avoid garbage in resource name
Browse files Browse the repository at this point in the history
Set temporary variable as 0 to avoid garbage string output from
/proc/iomem after register resources and reset to PNP dev name
later.

Signed-off-by: Liu ShuoX <shuox.liu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Liu ShuoX authored and rafaeljw committed Jul 17, 2013
1 parent d19f503 commit 3c0fc07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pnp/pnpacpi/rsparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
struct pnp_dev *dev = data;
struct acpi_resource_dma *dma;
struct acpi_resource_vendor_typed *vendor_typed;
struct resource r;
struct resource r = {0};
int i, flags;

if (acpi_dev_resource_memory(res, &r)
Expand Down
1 change: 1 addition & 0 deletions drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
}

pnp_res->res = *res;
pnp_res->res.name = dev->name;
dev_dbg(&dev->dev, "%pR\n", res);
return pnp_res;
}
Expand Down

0 comments on commit 3c0fc07

Please sign in to comment.