Skip to content

Commit

Permalink
ACPI / dock: Drop unnecessary local variable from dock_add()
Browse files Browse the repository at this point in the history
The local variable id in dock_add() is not necessary, so drop it.

While we're at it, use an initializer to clear the local variable ds
and drop the memset() used for this purpose.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Jul 14, 2013
1 parent f09ce74 commit 2efbca4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,14 +836,13 @@ static struct attribute_group dock_attribute_group = {
*/
static int __init dock_add(acpi_handle handle)
{
int ret, id;
struct dock_station ds, *dock_station;
struct dock_station *dock_station, ds = { NULL, };
struct platform_device *dd;
acpi_status status;
int ret;

id = dock_station_count;
memset(&ds, 0, sizeof(ds));
dd = platform_device_register_data(NULL, "dock", id, &ds, sizeof(ds));
dd = platform_device_register_data(NULL, "dock", dock_station_count,
&ds, sizeof(ds));
if (IS_ERR(dd))
return PTR_ERR(dd);

Expand Down

0 comments on commit 2efbca4

Please sign in to comment.