[PATCH v3 0/3] ti_sci: Address some issues found by Smatch
    Anshul Dalal 
    anshuld at ti.com
       
    Wed Oct  8 13:46:05 CEST 2025
    
    
  
On Wed Oct 8, 2025 at 2:53 PM IST, Andrew Goodbody wrote:
> Prevent a memory leak from a non-freed malloc.
> Return an error code on an error path.
> Assign a value to a pointer before it is dereferenced.
>
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> ---
> Changes in v3:
> - Pick up review tags
> - Change dev_dbg call to dev_err to be consistent with surrounding code
>   in 2/3
> - Update subject line of 3/3 to be more explicit
> - Link to v2: https://lore.kernel.org/r/20251007-ti_sci-v2-0-7561d7ea07b2@linaro.org
>
> Changes in v2:
> - Add cast when assigning to resp
> - Replace malloc with devm_kmalloc
> - Link to v1: https://lore.kernel.org/r/20251006-ti_sci-v1-0-9cef92e1022d@linaro.org
>
> ---
> Andrew Goodbody (3):
>       ti_sci: Prevent memory leak
>       ti_sci: Provide error code on error exit
>       ti_sci: Pointer is never assigned to valid value
>
>  drivers/firmware/ti_sci.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> ---
> base-commit: c280c4f7e52f08255f491783b3143a3be1fc08b0
> change-id: 20250725-ti_sci-7bc55cb0cdba
>
> Best regards,
For the entire series:
Tested-by: Anshul Dalal <anshuld at ti.com> (on TI AM62x EVM)
Thanks for the cleanup!
Regards,
Anshul
    
    
More information about the U-Boot
mailing list