mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Tony Huang <tonyhuang.sunplus@gmail.com>,
	Li-hao Kuo <lhjeff911@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org,
	error27@gmail.com
Subject: Re: [PATCH next] mmc: sunplus: Fix error handling in spmmc_drv_probe()
Date: Tue, 8 Aug 2023 23:19:29 +0530	[thread overview]
Message-ID: <c8cc29b7-834e-195a-36c2-b53be5e17a9b@oracle.com> (raw)
In-Reply-To: <CAPDyKFr9inG4dgAUYhrQOEND1Fu1CDajEPoO3W=dBRRXB=kceQ@mail.gmail.com>

Hi,

On 08/08/23 2:30 pm, Ulf Hansson wrote:
> On Tue, 1 Aug 2023 at 07:23, Harshit Mogalapalli
> <harshit.m.mogalapalli@oracle.com> 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.
> 
> Rather than adding a bunch of new "gotos", how about converting into
> using devm_mmc_alloc_host()?
> 
Thanks for the suggestion. Yes it would reduce many "gotos".

Will send a V2 with the changes.

>> 3. platform_get_irq() doesn't return zero, so '<' is sufficient.
>>
(Also will split this into different patch as it's fixing a different 
thing than above.)

Thanks,
Harshit
>> 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@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>
> 
> Other than the above, this looks good to me!
> 
> Kind regards
> Uffe

      reply	other threads:[~2023-08-08 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  5:23 Harshit Mogalapalli
2023-08-01  5:48 ` Dan Carpenter
2023-08-08  9:00 ` Ulf Hansson
2023-08-08 17:49   ` Harshit Mogalapalli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8cc29b7-834e-195a-36c2-b53be5e17a9b@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lhjeff911@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=tonyhuang.sunplus@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®