From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: usbkbd: return proper error code
Date: Thu, 01 Sep 2016 23:28:01 +0530 [thread overview]
Message-ID: <57C86C29.1070807@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1609011320050.22028@cbobk.fhfr.pm>
On Thursday 01 September 2016 04:51 PM, Jiri Kosina wrote:
> On Wed, 31 Aug 2016, Sudip Mukherjee wrote:
>
>> Use proper error code instead of using -1 on failure to allocate
>> memory. We may use the error code later in the caller.
>
> But we don't. usb_kbd_probe() returns -ENOMEM in case usb_kbd_alloc_mem()
> fails anyway, so I fail to see the point of the change really.
>
Well, yes, we don't as of now.
When I was reading the code for something related to my day job I was a
bit confused with -1 instead of a proper error code. I am sure there
will be many others like me.
Its fine if you think the change is not needed.
regards
sudip
prev parent reply other threads:[~2016-09-01 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 16:28 [PATCH] HID: usbkbd: return proper error code Sudip Mukherjee
2016-08-31 16:33 ` Fabio Estevam
2016-08-31 17:38 ` Sudip Mukherjee
2016-09-01 11:21 ` Jiri Kosina
2016-09-01 17:58 ` Sudip Mukherjee [this message]
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=57C86C29.1070807@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).