Harshit Mogalapalli cf3f15b8c6 mmc: sunplus: Fix error handling in spmmc_drv_probe()
When mmc allocation succeeds, the error paths are not freeing mmc.

Fix the above issue by changing mmc_alloc_host() to devm_mmc_alloc_host()
to simplify the error handling. Remove label 'probe_free_host' as devm_*
api takes care of freeing, also remove mmc_free_host() from remove
function as devm_* takes care of freeing.

Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230809071812.547229-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-08-09 13:14:53 +02:00
..
2023-06-19 13:31:12 +02:00
2021-02-15 10:43:23 +01:00
2022-12-13 13:41:26 -08:00
2023-02-27 09:47:26 -08:00
2023-06-19 13:41:58 +02:00
2023-06-19 13:31:12 +02:00
2023-06-29 10:11:10 -07:00
2023-06-19 13:31:12 +02:00
2023-06-13 10:41:28 +02:00
2023-06-19 13:31:12 +02:00
2023-06-19 13:31:40 +02:00