From: Ian Abbott <abbotti@mev.co.uk>
To: Santosh <santhosh.pai88@yahoo.com>, hsweeten@visionengravers.com
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code
Date: Mon, 22 Jun 2015 10:37:43 +0100 [thread overview]
Message-ID: <5587D767.5040004@mev.co.uk> (raw)
In-Reply-To: <55868B64.5030004@yahoo.com>
On 21/06/15 11:01, Santosh wrote:
> This patch fixes the checkpatch.pl warning:
>
> WARNING: ENOSYS means 'invalid syscall nr' and nothing else
>
> Regards,
>
> Santosh Pai
>
>
> 0001-staging-Comedi-comedi_fops-Fixed-the-return-error-co.patch
Greg doesn't usually take patches in attachments.
> From 502464417255edb52a1db71146e2f33e67df87ce Mon Sep 17 00:00:00 2001
> From: sanpai<santhosh.pai88@yahoo.com>
> Date: Sun, 21 Jun 2015 15:05:00 +0530
> Subject: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code
>
> try_module_get fails when the reference count of the module is not
> allowed to be incremented ,and hence -EPERM is returned.
>
> Signed-off-by: sanpai<santhosh.pai88@yahoo.com>
> ---
> drivers/staging/comedi/comedi_fops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> index 985d94b..d6a37e9 100644
> --- a/drivers/staging/comedi/comedi_fops.c
> +++ b/drivers/staging/comedi/comedi_fops.c
> @@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file)
> }
> if (dev->attached && dev->use_count == 0) {
> if (!try_module_get(dev->driver->module)) {
> - rc = -ENOSYS;
> + rc = -EPERM;
Why -EPERM? I think either -ENODEV or -ENXIO would be better.
> goto out;
> }
> if (dev->open) {
> -- 1.7.9.5
>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
next parent reply other threads:[~2015-06-22 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <55868B64.5030004@yahoo.com>
2015-06-22 9:37 ` Ian Abbott [this message]
2015-06-22 11:22 ` [PATCH] staging : Comedi : comedi_fops : Fixed the return error code Sudip Mukherjee
2015-06-29 9:28 Subject: [PATCH 1/2] staging : Comedi : comedi_fops : Fixed the return error, code Ian Abbott
2015-06-29 9:41 ` [PATCH] staging: Comedi: comedi_fops: Fixed the return error code Ian Abbott
2015-06-29 9:43 ` Ian Abbott
2015-06-29 9:44 ` Ian Abbott
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=5587D767.5040004@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=santhosh.pai88@yahoo.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.