mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Hohnstaedt <Christian.Hohnstaedt@wago.com>
To: "J, KEERTHY" <j-keerthy@ti.com>, Lee Jones <lee.jones@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>
Subject: [PATCH] tps65218.c: fix IRQ resource leak in tps65218_probe()
Date: Thu, 6 Dec 2018 10:57:59 +0100	[thread overview]
Message-ID: <1544090279-26762-1-git-send-email-Christian.Hohnstaedt@wago.com> (raw)

Free allocated IRQ if reading the device ID fails.

Signed-off-by: Christian Hohnstaedt <Christian.Hohnstaedt@wago.com>
---
 drivers/mfd/tps65218.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index 910f569..19270bc 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -244,7 +244,7 @@ static int tps65218_probe(struct i2c_client *client,
 	ret = regmap_read(tps->regmap, TPS65218_REG_CHIPID, &chipid);
 	if (ret) {
 		dev_err(tps->dev, "Failed to read chipid: %d\n", ret);
-		return ret;
+		goto err_irq;
 	}
 
 	tps->rev = chipid & TPS65218_CHIPID_REV_MASK;
-- 
2.7.4


             reply	other threads:[~2018-12-06  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06  9:57 Christian Hohnstaedt [this message]
2018-12-14 12:25 ` Lee Jones
2018-12-14 12:26   ` Lee Jones
2018-12-17  6:01     ` J, KEERTHY
2018-12-17 14:34       ` Lee Jones

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=1544090279-26762-1-git-send-email-Christian.Hohnstaedt@wago.com \
    --to=christian.hohnstaedt@wago.com \
    --cc=j-keerthy@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@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

all inboxes | Powered by JetHome®