-----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? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkt0qPUACgkQwuRiAT9o60+REACg6T73GpC3jz5dkAW+CFsAPLsz w4sAn3ttnpvH85bECwYxe8WPhJ77Zs2z =xRv3 -----END PGP SIGNATURE----- -- 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