[PATCH] bus: mhi: host: Avoid possible uninitialized fw_load_type
Jeff Hugo
jeff.hugo at oss.qualcomm.com
Fri Feb 21 17:38:59 UTC 2025
On 2/14/2025 9:21 AM, Jeffrey Hugo wrote:
> If mhi_fw_load_handler() bails out early because the EE is not capable
> of loading firmware, we may reference fw_load_type in cleanup which is
> uninitialized at this point. The cleanup code checks fw_load_type as a
> proxy for knowing if fbc_image was allocated and needs to be freed, but
> we can directly test for that. This avoids the possible uninitialized
> access and appears to be clearer code.
>
> Reported-by: Dan Carpenter <dan.carpenter at linaro.org>
> Closes: https://lore.kernel.org/all/e3148ac4-7bb8-422d-ae0f-18a8eb15e269@stanley.mountain/
> Fixes: f88f1d0998ea ("bus: mhi: host: Add a policy to enable image transfer via BHIe in PBL")
> Signed-off-by: Jeffrey Hugo <quic_jhugo at quicinc.com>
> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
> Reviewed-by: Carl Vanderlip <quic_carlv at quicinc.com>
Applied to drm-misc-next.
-Jeff
More information about the dri-devel
mailing list