[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1509302138380.30132@pobox.suse.cz>
Date: Wed, 30 Sep 2015 21:40:29 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Luis de Bethencourt <luisbg@....samsung.com>
cc: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
linux-input@...r.kernel.org
Subject: Re: [PATCH] HID: hiddev: fix returned errno code in
hiddev_connect()
On Wed, 30 Sep 2015, Luis de Bethencourt 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.
Generally I agree that the more specific errno, the better.
But I am not really sure where you are seeing the bug (mapping to -EPERM)
in this case? I think the only caller of hiddev_connect() should be
hid_connect(), and the only thing that guy cares about whether individual
callbacks succeed or fail, so that it sets hdev->clamed flags accordingly.
Could you please be more specific about the -EPERM mapping you are talking
about?
Thanks,
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists