From: Jean Delvare <jdelvare@suse.de>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Matt Fleming <matt.fleming@intel.com>,
Guenter Roeck <linux@roeck-us.net>,
Wolfram Sang <wsa@the-dreams.de>,
Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] i2c: i801: unregister tco_pdev in i801_probe() error path
Date: Sun, 17 Sep 2023 19:33:22 +0200 [thread overview]
Message-ID: <20230917193322.4ec0aec7@endymion.delvare> (raw)
In-Reply-To: <458b1c8b-1885-6583-f45d-7548ce65bb33@gmail.com>
On Thu, 14 Sep 2023 23:08:44 +0200, Heiner Kallweit wrote:
> We have to unregister tco_pdev also if i2c_add_adapter() fails.
>
> Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/i2c/busses/i2c-i801.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index f53be242f..9bd712eaf 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -1753,6 +1753,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
> "SMBus I801 adapter at %04lx", priv->smba);
> err = i2c_add_adapter(&priv->adapter);
> if (err) {
> + platform_device_unregister(priv->tco_pdev);
> i801_acpi_remove(priv);
> return err;
> }
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2023-09-17 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 21:08 [PATCH] i2c: i801: unregister tco_pdev in i801_probe() error path Heiner Kallweit
2023-09-15 4:55 ` Mika Westerberg
2023-09-17 17:33 ` Jean Delvare [this message]
2023-09-19 9:03 ` Wolfram Sang
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=20230917193322.4ec0aec7@endymion.delvare \
--to=jdelvare@suse.de \
--cc=andi.shyti@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matt.fleming@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
/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