From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753333AbbF2JPT (ORCPT ); Mon, 29 Jun 2015 05:15:19 -0400 Received: from smtp121.iad3a.emailsrvr.com ([173.203.187.121]:48757 "EHLO smtp121.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753180AbbF2JPH (ORCPT ); Mon, 29 Jun 2015 05:15:07 -0400 X-Sender-Id: abbotti@mev.co.uk Message-ID: <55910C98.3070406@mev.co.uk> Date: Mon, 29 Jun 2015 10:15:04 +0100 From: Ian Abbott User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Santhosh Pai , sudipm.mukherjee@gmail.com CC: hsweeten@visionengravers.com, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: Subject: [PATCH 1/2] staging : Comedi : comedi_fops : Fixed the return error, code References: <558E3641.1050405@yahoo.com> In-Reply-To: <558E3641.1050405@yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/06/15 06:36, Santhosh Pai wrote: > > From 9ea09e194d6ccdd0b229b408df1c86b43b1fdd7d Mon Sep 17 00:00:00 2001 > From: santhosh pai > Date: Mon, 22 Jun 2015 23:26:33 +0530 > Subject: [PATCH 2/2] 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 -ENXIO is returned indicating > no device or address. > > Signed-off-by: santhosh pai > --- > 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 d6a37e9..1ab443c 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 = -EPERM; > + rc = -ENXIO; > goto out; > } > if (dev->open) { > The patch itself is okay, but all the stuff around the patch is a bit weird, such as: 1. all those email headers in the commit message 2. useless indentation in the commit message 3. subject line in commit message says "PATCH 2/2", but email subject line says "PATCH 1/2" 4. stray comma in email subject line 5. spaces before colon in subject lines This is taking too long, so I'll post a cleaned-up version. -- -=( Ian Abbott @ MEV Ltd. E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-