[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2cWFT7BiePJQjYO-_9QjCvWf1mQPE8NEZ4dXgira=iaA@mail.gmail.com>
Date: Wed, 24 Mar 2021 13:03:50 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Xu Jia <xujia39@...wei.com>
Cc: gregkh <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH -next] applicom: fix some err codes returned by ac_ioctl
On Wed, Mar 24, 2021 at 8:20 AM Xu Jia <xujia39@...wei.com> wrote:
>
> When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be
> returned back. Fix the 'ret' set but not used.
>
> Signed-off-by: Xu Jia <xujia39@...wei.com>
Reviewed-by: Arnd Bergmann <arnd@...db.de>
> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
> index 14b2d8034c51..0ab765143354 100644
> --- a/drivers/char/applicom.c
> +++ b/drivers/char/applicom.c
> @@ -839,7 +839,7 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> Dummy = readb(apbs[IndexCard].RamIO + VERS);
> kfree(adgl);
> mutex_unlock(&ac_mutex);
> - return 0;
> + return ret;
>
Apparently this has been broken since the driver was first merged in
linux-2.3.16. I could find no indication of anyone using the driver
and reporting any problems in the git history and it clearly still has
the style of drivers writting in the 1990s. On the other hand, this is
(was) used in some very long-lived systems and you can still
buy old applicom cards from artisan[1].
Is there any chance this driver is still used anywhere with modern
kernels? I suspect we could move it to staging to find out.
Arnd
[1] https://www.artisantg.com/Mfgr/MolexWoodheadApplicom
Powered by blists - more mailing lists