From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Daeseok Youn <daeseok.youn@gmail.com>,
driverdev-devel@linuxdriverproject.org,
Lidza Louina <lidza.louina@gmail.com>
Subject: Re: [PATCH] staging: dgap: fix returned errno code in dgap_parsefile()
Date: Tue, 22 Sep 2015 10:22:38 +0530 [thread overview]
Message-ID: <20150922045238.GA5526@sudip-pc> (raw)
In-Reply-To: <1442882376-23634-1-git-send-email-javier@osg.samsung.com>
On Tue, Sep 22, 2015 at 02:39:36AM +0200, Javier Martinez Canillas wrote:
> The driver is using -1 instead of the -ENOMEM defined macro to specify
> that a buffer allocation failed. Since the error number is propagated,
> the caller will get a -EPERM which is the wrong error condition.
Just a little doubt. caller means the function which is calling this
dgap_parsefile() or you meant the user?
The function which is calling this dgap_parsefile() is just checking if
it has received 0 or something else. Something else is error and it
rerturns -EINVAL for all types of error (ofcourse that is also wrong).
So the user will see -EINVAL for all types of error in dgap_parsefile().
regards
sudip
next prev parent reply other threads:[~2015-09-22 4:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 0:39 [PATCH] staging: dgap: fix returned errno code in dgap_parsefile() Javier Martinez Canillas
2015-09-22 4:52 ` Sudip Mukherjee [this message]
2015-09-22 6:38 ` Javier Martinez Canillas
2015-09-22 6:52 ` Sudip Mukherjee
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=20150922045238.GA5526@sudip-pc \
--to=sudipm.mukherjee@gmail.com \
--cc=daeseok.youn@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=javier@osg.samsung.com \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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.