mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <linux@rempel-privat.de>
Subject: [PATCH v1 5/9] mfd: da9063: fix wrong NULL pointer test
Date: Tue, 20 Nov 2018 21:07:10 +0100	[thread overview]
Message-ID: <20181120200714.3692-6-linux@rempel-privat.de> (raw)
In-Reply-To: <20181120200714.3692-1-linux@rempel-privat.de>

checking for priv == NULL and using in this case priv->dev
makes no sense.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/mfd/da9063.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index b6114a614..a7fff2c5b 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -201,7 +201,7 @@ static int da9062_device_init(struct da9063 *priv)
 
 	priv->client1 = i2c_new_dummy(priv->client->adapter,
 				      priv->client->addr + 1);
-	if (!priv) {
+	if (!priv->client1) {
 		dev_warn(priv->dev, "failed to create bank 1 device\n");
 		/* TODO: return -EINVAL; i2c api does not return more
 		 * details */
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-11-20 20:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 20:07 [PATCH v1 0/9] random fixes Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 1/9] net: e1000: fix "Uninitialized variable: phy_data" warning Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 2/9] pinctrl: tegra30: fix "Possible null pointer dereference: group" warning Oleksij Rempel
2018-11-21  9:16   ` Lucas Stach
2018-11-21  9:40     ` Oleksij Rempel
2018-11-21 10:01       ` Lucas Stach
2018-11-20 20:07 ` [PATCH v1 3/9] fs: closedir: remove uninitialized variable ret Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 4/9] fs: fix possible null pointer dereference of base Oleksij Rempel
2018-11-20 20:07 ` Oleksij Rempel [this message]
2018-11-20 20:07 ` [PATCH v1 6/9] usb: at91_udc: remove useless NULL check Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 7/9] mtd: atmel_nand: remove erroneous case Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 8/9] usb: musb: fix possible out of bounds access Oleksij Rempel
2018-11-20 20:07 ` [PATCH v1 9/9] lib: lodepng: remove useless test Oleksij Rempel
2018-11-21  8:08 ` [PATCH v1 0/9] random fixes Sascha Hauer

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=20181120200714.3692-6-linux@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=barebox@lists.infradead.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