Commit 9dd3f1ef authored by Markus Elfring's avatar Markus Elfring Committed by Hans de Goede
Browse files

platform/x86/amd/pmf: Return directly after a failed apmf_if_call() in...


platform/x86/amd/pmf: Return directly after a failed apmf_if_call() in apmf_sbios_heartbeat_notify()

The kfree() function was called in one case by
the apmf_sbios_heartbeat_notify() function during error handling
even if the passed variable contained a null pointer.
This issue was detected by using the Coccinelle software.

* Thus return directly after a call of the function “apmf_if_call” failed
  at the beginning.

* Delete the label “out” which became unnecessary with this refactoring.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Link: https://lore.kernel.org/r/362ee824-fc53-4e19-9529-8b621657635b@web.de


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 87d8f1ee
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment