From: Johan Hovold <johan@kernel.org>
To: Mao Wenan <maowenan@huawei.com>
Cc: jacmet@sunsite.dk, gregkh@linuxfoundation.org, jslaby@suse.com,
shubhrajyoti.datta@xilinx.com, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] serial: uartlite: Missing uart_unregister_driver() on error in ulite_probe()
Date: Fri, 01 Nov 2019 11:41:53 +0000 [thread overview]
Message-ID: <20191101114153.GC3657@localhost> (raw)
In-Reply-To: <20191101111950.47817-1-maowenan@huawei.com>
On Fri, Nov 01, 2019 at 07:19:50PM +0800, Mao Wenan wrote:
> If uart_register_driver(&ulite_uart_driver) is success,
> but followed function is failed in ulite_probe, it needs to call
> uart_unregister_driver to unregister.
>
> Fixes: f33cf776617b ("serial-uartlite: Move the uart register")
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
No, this is broken. The driver is deregistered at module unload.
That said, f33cf776617b ("serial-uartlite: Move the uart register")
should never have been merged as I have pointed out before:
https://lkml.kernel.org/r/20190523091839.GC568@localhost
I'll see if I can find some time to revisit this and start yelling at
Xilinx people again.
Johan
WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Mao Wenan <maowenan@huawei.com>
Cc: jacmet@sunsite.dk, gregkh@linuxfoundation.org, jslaby@suse.com,
shubhrajyoti.datta@xilinx.com, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] serial: uartlite: Missing uart_unregister_driver() on error in ulite_probe()
Date: Fri, 1 Nov 2019 12:41:53 +0100 [thread overview]
Message-ID: <20191101114153.GC3657@localhost> (raw)
In-Reply-To: <20191101111950.47817-1-maowenan@huawei.com>
On Fri, Nov 01, 2019 at 07:19:50PM +0800, Mao Wenan wrote:
> If uart_register_driver(&ulite_uart_driver) is success,
> but followed function is failed in ulite_probe, it needs to call
> uart_unregister_driver to unregister.
>
> Fixes: f33cf776617b ("serial-uartlite: Move the uart register")
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
No, this is broken. The driver is deregistered at module unload.
That said, f33cf776617b ("serial-uartlite: Move the uart register")
should never have been merged as I have pointed out before:
https://lkml.kernel.org/r/20190523091839.GC568@localhost
I'll see if I can find some time to revisit this and start yelling at
Xilinx people again.
Johan
next prev parent reply other threads:[~2019-11-01 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 11:19 [PATCH -next] serial: uartlite: Missing uart_unregister_driver() on error in ulite_probe() Mao Wenan
2019-11-01 11:19 ` Mao Wenan
2019-11-01 11:41 ` Johan Hovold [this message]
2019-11-01 11:41 ` Johan Hovold
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=20191101114153.GC3657@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jacmet@sunsite.dk \
--cc=jslaby@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=maowenan@huawei.com \
--cc=shubhrajyoti.datta@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.