Re: [PATCH -next] tty: moxa: add missing pci_disable_device()

From: Greg KH
Date: Fri Sep 23 2022 - 05:56:55 EST


On Fri, Sep 23, 2022 at 05:25:30PM +0800, ruanjinjie wrote:
> Driver should call pci_disable_device() if it returns from
> moxa_pci_probe() with error.

Why?

That is not a normal thing to do, as you can disable other PCI devices
attached to it, right?

> Meanwhile, the driver calls pci_enable_device() in
> moxa_pci_probe(), but never calls pci_disable_device() during removal.

And is that really a problem?

>
> Signed-off-by: ruanjinjie <ruanjinjie@xxxxxxxxxx>
> ---
> drivers/tty/moxa.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Do you have this hardware to test with?

How did you find this issue?

thanks,

greg k-h