public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Minjie Du <duminjie@vivo.com>,
	linux-i2c@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	opensource.kernel@vivo.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init()
Date: Thu, 13 Jul 2023 11:53:10 +0200	[thread overview]
Message-ID: <20230713095310.mafkoqrjwhm5r4mf@intel.intel> (raw)
In-Reply-To: <d6d04803-0dc1-9565-23b4-740425066a01@web.de>

Hi Markus,

> > +++ b/drivers/i2c/busses/i2c-gpio.c
> > @@ -265,7 +265,7 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
> >  	 */
> >  	if (!i2c_gpio_debug_dir) {
> >  		i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
> > -		if (!i2c_gpio_debug_dir)
> > +		if (IS_ERR(i2c_gpio_debug_dir))
> >  			return;
> >  	}
> 
> Will the development attention grow also for the exception handling
> which is missing here so far?

Well, it depends why you need to handle the error return. I think
it's not important if this fails... the only reason I would
handle the error here is to print a warning in dmesg.

Thank you,
Andi

      parent reply	other threads:[~2023-07-13  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  2:05 [PATCH v3] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init() Minjie Du
2023-07-13  9:50 ` Andi Shyti
     [not found] ` <d6d04803-0dc1-9565-23b4-740425066a01@web.de>
2023-07-13  9:53   ` Andi Shyti [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=20230713095310.mafkoqrjwhm5r4mf@intel.intel \
    --to=andi.shyti@kernel.org \
    --cc=Markus.Elfring@web.de \
    --cc=duminjie@vivo.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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