From: Lee Jones <lee.jones@linaro.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mfd: bcm590xx: Simplify a test
Date: Mon, 14 Nov 2016 17:40:46 +0000 [thread overview]
Message-ID: <20161114174046.GB4094@dell> (raw)
In-Reply-To: <20161101064905.11961-1-christophe.jaillet@wanadoo.fr>
On Tue, 01 Nov 2016, Christophe JAILLET wrote:
> 'i2c_new_dummy()' does not return an error pointer, so the test can be
> simplified to be more consistent.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/mfd/bcm590xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
> diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c
> index 0d76d690176b..c572a35a9341 100644
> --- a/drivers/mfd/bcm590xx.c
> +++ b/drivers/mfd/bcm590xx.c
> @@ -67,7 +67,7 @@ static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri,
> /* Secondary I2C slave address is the base address with A(2) asserted */
> bcm590xx->i2c_sec = i2c_new_dummy(i2c_pri->adapter,
> i2c_pri->addr | BIT(2));
> - if (IS_ERR_OR_NULL(bcm590xx->i2c_sec)) {
> + if (!bcm590xx->i2c_sec) {
> dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n");
> return -ENODEV;
> }
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2016-11-14 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 6:49 [PATCH] mfd: bcm590xx: Simplify a test Christophe JAILLET
2016-11-14 17:40 ` Lee Jones [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=20161114174046.GB4094@dell \
--to=lee.jones@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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