Skip to content
Commit 99a049aa authored by Bryan Brattlof's avatar Bryan Brattlof Committed by Daniel Lezcano
Browse files

thermal/drivers/k3_j72xx_bandgap: Fix ref_table memory leak during probe



If an error occurs in the k3_j72xx_bandgap_probe() function the memory
allocated to the 'ref_table' will not be released.

Add a err_free_ref_table step to the error path to free 'ref_table'

Fixes: 72b3fc61c752 ("thermal: k3_j72xx_bandgap: Add the bandgap driver support")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBryan Brattlof <bb@ti.com>
Reviewed-by: default avatarKeerthy <j-keerthy@ti.com>
Link: https://lore.kernel.org/r/20220525213617.30002-1-bb@ti.com


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 4102c404
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