Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 10824a88 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

PM / devfreq: memlat: Remove kfree() on probe fails



Memory allocated with devm_kzalloc() is automatically freed if
the probe function fails and returns an error code. So there
is no need to free cpu_grp explicitly for the failure cases
that might come up after it is allocated. Additionally calls to
devm_kzalloc() must be accompanied by devm_kfree() if memory
deallocation is necessary.
For these reasons remove the kfree(cpu_grp) from the probe
function.

Change-Id: Ic4838fd58d40d283ac301facc64b06813eb3bd7d
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 28352998
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment