From: Michael Poole <mdpoole@troilus.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>,
Benjamin Tissoires <tissoire@tls.cena.fr>,
Stephane Chatty <chatty@enac.fr>
Subject: Re: [PATCH 1/1] hid-magicmouse: Fix oops after device removal.
Date: Tue, 09 Mar 2010 06:32:30 -0500 [thread overview]
Message-ID: <87ocix20j5.fsf@troilus.org> (raw)
In-Reply-To: <20100309074820.GD17288@core.coreip.homeip.net> (Dmitry Torokhov's message of "Mon, 8 Mar 2010 23:48:20 -0800")
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
next prev parent reply other threads:[~2010-03-09 11:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 0:38 [PATCH 1/1] hid-magicmouse: Fix oops after device removal Michael Poole
2010-03-09 7:48 ` Dmitry Torokhov
2010-03-09 11:32 ` Michael Poole [this message]
2010-03-09 11:47 ` [PATCH v2] " Michael Poole
2010-03-09 12:37 ` Jiri Kosina
2010-03-09 17:36 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ocix20j5.fsf@troilus.org \
--to=mdpoole@troilus.org \
--cc=chatty@enac.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=tissoire@tls.cena.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.