[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <042ff6f5-58d4-4e93-aa26-79411bf81c54@kadam.mountain>
Date: Tue, 1 Aug 2023 08:48:43 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc: Tony Huang <tonyhuang.sunplus@...il.com>,
Li-hao Kuo <lhjeff911@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Arnd Bergmann <arnd@...db.de>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
error27@...il.com
Subject: Re: [PATCH next] mmc: sunplus: Fix error handling in
spmmc_drv_probe()
On Mon, Jul 31, 2023 at 10:23:20PM -0700, Harshit Mogalapalli wrote:
> There are few issues in spmmc_drv_probe():
>
> 1. When mmc allocation fails, goto is a no-op.
> 2. When mmc allocation succeeds, the error paths should use goto instead
> of direct return.
> 3. platform_get_irq() doesn't return zero, so '<' is sufficient.
>
> Fix the above issues by adding goto instead of direct return, also
> remove NULL check in 'probe_free_host' as we changed the goto to return
> when mmc_alloc_host() fails.
>
> Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---
LGTM.
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists