Skip to content

Commit

Permalink
ACPI / processor: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
kfree() on a NULL pointer is a no-op, so remove a redundant NULL
pointer check in map_mat_entry().

[rjw: Changelog]
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Syam Sidhardhan authored and Rafael J. Wysocki committed Mar 4, 2013
1 parent ed4cf5b commit 5273a25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
}

exit:
if (buffer.pointer)
kfree(buffer.pointer);
kfree(buffer.pointer);
return apic_id;
}

Expand Down

0 comments on commit 5273a25

Please sign in to comment.