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