Re: [PATCH 1/1] hid-magicmouse: Fix oops after device removal.

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

 



Dmitry Torokhov writes:

>>  static void magicmouse_remove(struct hid_device *hdev)
>>  {
>> +	struct magicmouse_sc *msc;
>
> Blank lines between variable definitions and code are always
> appreciated. but also coudl be written as:
>
> 	struct magicmouse_sc *msc = hid_get_drvdata(dev);
>
>> +	msc = hid_get_drvdata(hdev);
>>  	hid_hw_stop(hdev);
>> +	input_unregister_device(msc->input);
>>  	kfree(hid_get_drvdata(hdev));
>
> You have msc already sho that should be 'kfree(msc);'.

I'll fix both of these and resubmit.  Thanks for the review.

Michael


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