Re: [PATCH 1/2] hid: usbhid: Return -ENOMEM instead of -1 for memory allocation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 27 Nov 2012, Sachin Kamat wrote:

> > Fully agree with you.
> >
> > But I'd like to have both sides changed together once someone starts
> > taking care of fixing it.
> 
> The proposed change is done in the function hiddev_connect which
> returns 0 on success.
> The caller only checks if the return value is 0 or not
> (!hdev->hiddev_connect(...)). In this case
> what is the change that you would like to see on the caller side?

A check whether the value returned by hiddev_connect() is error code 
(through IS_ERR_VALUE() or something similar), and continue propagating 
the error out of hid_connect().

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux