From: Helge Deller <deller@gmx.de>
To: Shang XiaoJing <shangxiaojing@huawei.com>,
FlorianSchandinat@gmx.de, corbet@lwn.net,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] video: fbdev: via: Fix error in via_core_init()
Date: Mon, 14 Nov 2022 08:26:48 +0100 [thread overview]
Message-ID: <b0ebfdc4-f4d5-183a-eebc-b38703e89362@gmx.de> (raw)
In-Reply-To: <20221114010852.24654-1-shangxiaojing@huawei.com>
On 11/14/22 02:08, Shang XiaoJing wrote:
> via_core_init() won't exit the driver when pci_register_driver() failed.
> Exit the viafb-i2c and the viafb-gpio in failed path to prevent error.
>
> VIA Graphics Integration Chipset framebuffer 2.4 initializing
> Error: Driver 'viafb-i2c' is already registered, aborting...
> Error: Driver 'viafb-gpio' is already registered, aborting...
>
> Fixes: 7582eb9be85f ("viafb: Turn GPIO and i2c into proper platform devices")
> Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/via/via-core.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/via/via-core.c b/drivers/video/fbdev/via/via-core.c
> index 2ee8fcae08df..b2e3b5df38cd 100644
> --- a/drivers/video/fbdev/via/via-core.c
> +++ b/drivers/video/fbdev/via/via-core.c
> @@ -730,7 +730,15 @@ static int __init via_core_init(void)
> return ret;
> viafb_i2c_init();
> viafb_gpio_init();
> - return pci_register_driver(&via_driver);
> + ret = pci_register_driver(&via_driver);
> + if (ret) {
> + viafb_gpio_exit();
> + viafb_i2c_exit();
> + viafb_exit();
> + return ret;
> + }
> +
> + return 0;
> }
>
> static void __exit via_core_exit(void)
prev parent reply other threads:[~2022-11-14 7:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 1:08 [PATCH] video: fbdev: via: Fix error in via_core_init() Shang XiaoJing
2022-11-14 7:26 ` Helge Deller [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=b0ebfdc4-f4d5-183a-eebc-b38703e89362@gmx.de \
--to=deller@gmx.de \
--cc=FlorianSchandinat@gmx.de \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=shangxiaojing@huawei.com \
/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