From: Andreas Kemnade <andreas@kemnade.info>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
vigneshr@ti.com, khilman@baylibre.com, rogerq@kernel.org,
tony@atomide.com, jmkrzyszt@gmail.com, andi.shyti@kernel.org,
miaoqinglang@huawei.com, grygorii.strashko@ti.com,
wsa@kernel.org, Jean Delvare <khali@linux-fr.org>,
Komal Shah <komal_shah802003@yahoo.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe()
Date: Fri, 18 Jul 2025 10:20:46 +0200 [thread overview]
Message-ID: <20250718102046.34f2b702@akair> (raw)
In-Reply-To: <aG60GJy60Jf3w8tZ@roadster.musicnaut.iki.fi>
Am Wed, 9 Jul 2025 21:25:28 +0300
schrieb Aaro Koskinen <aaro.koskinen@iki.fi>:
> Hi,
>
> On Sat, Jul 05, 2025 at 09:57:37AM +0200, Christophe JAILLET wrote:
> > omap_i2c_init() can fail. Handle this error in omap_i2c_probe().
> >
> > Fixes: 010d442c4a29 ("i2c: New bus driver for TI OMAP boards")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > Compile tested only.
> > ---
> > drivers/i2c/busses/i2c-omap.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> > index 8b01df3cc8e9..485313d872e5 100644
> > --- a/drivers/i2c/busses/i2c-omap.c
> > +++ b/drivers/i2c/busses/i2c-omap.c
> > @@ -1472,7 +1472,11 @@ omap_i2c_probe(struct platform_device *pdev)
> > }
> >
> > /* reset ASAP, clearing any IRQs */
> > - omap_i2c_init(omap);
> > + r = omap_i2c_init(omap);
> > + if (r) {
> > + dev_err(omap->dev, "failure to initialize i2c: %d\n", r);
>
> Error paths in omap_i2c_init already print a message and error code,
> so this is log is redundant.
>
And I have never seen these in normal operation, so adding that error
check should be safe.
Regards,
Andreas
next prev parent reply other threads:[~2025-07-18 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-05 7:57 [PATCH 0/2] i2c: omap: 2 Fixes Christophe JAILLET
2025-07-05 7:57 ` [PATCH 1/2] i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe() Christophe JAILLET
2025-07-09 18:25 ` Aaro Koskinen
2025-07-09 19:03 ` Andi Shyti
2025-07-18 8:20 ` Andreas Kemnade [this message]
2025-07-05 7:57 ` [PATCH 2/2] i2c: omap: Fix an error handling path " Christophe JAILLET
2025-07-18 8:17 ` Andreas Kemnade
2025-07-09 14:02 ` [PATCH 0/2] i2c: omap: 2 Fixes Andi Shyti
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=20250718102046.34f2b702@akair \
--to=andreas@kemnade.info \
--cc=aaro.koskinen@iki.fi \
--cc=andi.shyti@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@suse.de \
--cc=grygorii.strashko@ti.com \
--cc=jmkrzyszt@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=khali@linux-fr.org \
--cc=khilman@baylibre.com \
--cc=komal_shah802003@yahoo.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=miaoqinglang@huawei.com \
--cc=rogerq@kernel.org \
--cc=tony@atomide.com \
--cc=vigneshr@ti.com \
--cc=wsa@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