Commit bb519cf6 authored by Kurt Borja's avatar Kurt Borja Committed by Rafael J. Wysocki
Browse files

ACPI: platform_profile: Improve platform_profile_unregister()



Drivers usually call this method on error/exit paths and do not check
for it's return value, which is always 0 anyway, so make it void.

This is safe to do as currently all drivers use
devm_platform_profile_register().

While at it, improve the style and make the function safer by checking
for IS_ERR_OR_NULL before dereferencing the device pointer.

Signed-off-by: default avatarKurt Borja <kuurtb@gmail.com>
Reviewed-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/20250212190308.21209-1-kuurtb@gmail.com


[ rjw: Minor changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent dd4f730b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment