linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v4 2/3] rtc: s5m: check the return value of s5m8767_rtc_init_reg()
Date: Mon, 11 Jan 2021 15:12:41 +0100	[thread overview]
Message-ID: <20210111141241.GA38402@kozik-lap> (raw)
In-Reply-To: <CAMRc=MdLAupcMkSEpdVJiBTogbN6G2aqr=kC+0GT6s-igSSL0g@mail.gmail.com>

On Mon, Jan 11, 2021 at 03:11:24PM +0100, Bartosz Golaszewski wrote:
> On Mon, Jan 11, 2021 at 2:35 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On Mon, Jan 11, 2021 at 01:40:26PM +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > >
> > > This function can fail if regmap operations fail so check its return
> > > value in probe().
> > >
> > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > ---
> > >  drivers/rtc/rtc-s5m.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
> > > index eb9dde4095a9..e0011d3cf61b 100644
> > > --- a/drivers/rtc/rtc-s5m.c
> > > +++ b/drivers/rtc/rtc-s5m.c
> > > @@ -791,6 +791,8 @@ static int s5m_rtc_probe(struct platform_device *pdev)
> > >       platform_set_drvdata(pdev, info);
> > >
> > >       ret = s5m8767_rtc_init_reg(info);
> > > +     if (ret)
> > > +             return ret;
> >
> > You leak I2C device.
> >
> 
> Yes, the next patch fixes it but I changed the order. Actually this
> can be moved after 3/3 with no conflicts when applying.

Yes, but for bisecting and any backporting (e.g. with autosel) the order
is quite important. Please resend with new order.

Best regards,
Krzysztof


  reply	other threads:[~2021-01-11 14:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 12:40 [PATCH v4 0/3] rtc: s5m: driver improvements Bartosz Golaszewski
2021-01-11 12:40 ` [PATCH v4 1/3] rtc: s5m: select REGMAP_I2C Bartosz Golaszewski
2021-01-11 13:33   ` Krzysztof Kozlowski
2021-01-11 12:40 ` [PATCH v4 2/3] rtc: s5m: check the return value of s5m8767_rtc_init_reg() Bartosz Golaszewski
2021-01-11 13:35   ` Krzysztof Kozlowski
2021-01-11 14:11     ` Bartosz Golaszewski
2021-01-11 14:12       ` Krzysztof Kozlowski [this message]
2021-01-11 12:40 ` [PATCH v4 3/3] rtc: s5m: use devm_i2c_new_dummy_device() Bartosz Golaszewski
2021-01-11 13:36   ` Krzysztof Kozlowski

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=20210111141241.GA38402@kozik-lap \
    --to=krzk@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).