From: Jonathan Cameron <jic23@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Kevin Tsai <ktsai@capellamicro.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Linus Walleij <linus.walleij@linaro.org>,
Cai Huoqing <cai.huoqing@linux.dev>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: cm3605: Fix an error handling path in cm3605_probe()
Date: Sun, 7 Aug 2022 15:18:36 +0100 [thread overview]
Message-ID: <20220807151836.5300af2b@jic23-huawei> (raw)
In-Reply-To: <0e186de2c125b3e17476ebf9c54eae4a5d66f994.1659854238.git.christophe.jaillet@wanadoo.fr>
On Sun, 7 Aug 2022 08:37:43 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> The commit in Fixes also introduced a new error handling path which should
> goto the existing error handling path.
> Otherwise some resources leak.
>
> Fixes: 0d31d91e6145 ("iio: light: cm3605: Make use of the helper function dev_err_probe()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
oops.
Applied to the fixes-togreg branch of iio.git.
I've just move that branch forwards to current char-misc-linus which includes
Greg's pull requests for this cycle via Linus' tree, but may well
rebase on rc1 once that's available.
Thanks,
Jonathan
> ---
> drivers/iio/light/cm3605.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
> index c721b69d5095..0b30db77f78b 100644
> --- a/drivers/iio/light/cm3605.c
> +++ b/drivers/iio/light/cm3605.c
> @@ -226,8 +226,10 @@ static int cm3605_probe(struct platform_device *pdev)
> }
>
> irq = platform_get_irq(pdev, 0);
> - if (irq < 0)
> - return dev_err_probe(dev, irq, "failed to get irq\n");
> + if (irq < 0) {
> + ret = dev_err_probe(dev, irq, "failed to get irq\n");
> + goto out_disable_aset;
> + }
>
> ret = devm_request_threaded_irq(dev, irq, cm3605_prox_irq,
> NULL, 0, "cm3605", indio_dev);
prev parent reply other threads:[~2022-08-07 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 6:37 [PATCH] iio: light: cm3605: Fix an error handling path in cm3605_probe() Christophe JAILLET
2022-08-07 14:18 ` Jonathan Cameron [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=20220807151836.5300af2b@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=cai.huoqing@linux.dev \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=ktsai@capellamicro.com \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@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