Re: [PATCH 1/4] HID: hid-ntrig add multi input quirk and clean up

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

 



On Thu, Feb 11, 2010 at 08:03:52PM -0500, Rafi Rubin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> >>  	nd = kmalloc(sizeof(struct ntrig_data), GFP_KERNEL);
> >>  	if (!nd) {
> >> @@ -255,14 +271,36 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
> >>  	if (!ret)
> >>  		ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
> >>  
> >> -	if (ret)
> >> +	if (ret) {
> >>  		kfree (nd);
> > 
> > What about hid_hw_stop()? Overall I'd rather see the standard error
> > unwinding path with gotos.
> 
> Cleaning up the probe function.  But it looks like the last caught error is from start, so is it fair to leave out stop?

Ah, yes, my bad.

-- 
Dmitry
--
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