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

Skip to content
Commit 729827e2 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

soc: qcom: pil: Fix memory management when loading firmware segs



When loading the firmware segments for a peripheral image,
a bitmap is used to track which segments could not be loaded
successfully. However, the current code allocates num_segs
number of unsigned longs, instead of allocating the number
of unsigned longs needed such that each seg is represented
as a bit. Also, the current code does not free the error
tracking bitmap after it is finished using it, or if the
segment data structures cannot be allocated.

During firmware segment loading, allocate enough unsigned
longs to represent each segment as a bit, and also free
the error tracking bitmap when it is no longer needed, and
when the segment loading data structures cannot be allocated.

Change-Id: Ica6aa6d82387ffbb9e0702093eef26a09aefed4a
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent fab1a14a
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