From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Cc: Axel Lin <axel.lin@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Matthew Garrett <mjg@redhat.com>, Len Brown <len.brown@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Stefani Seibold <stefani@seibold.net>,
Andi Kleen <ak@linux.intel.com>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2] fujitsu-laptop: remove unnecessary input_free_device
Date: Sun, 4 Jul 2010 01:37:42 -0700 [thread overview]
Message-ID: <20100704083742.GF32427@core.coreip.homeip.net> (raw)
In-Reply-To: <201007020735.o627Z2E1025678@mercury.physics.adelaide.edu.au>
On Fri, Jul 02, 2010 at 05:05:02PM +0930, Jonathan Woithe wrote:
> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Looks good to me too.
Acked-by: Dmitry Torokhov <dtor@mail.ru>
>
> > input_free_device should only be used if input_register_device()
> > was not called yet or if it failed.
> > This patch removes unnecessary input_free_device calls.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> > ---
> > drivers/platform/x86/fujitsu-laptop.c | 6 ++----
> > 1 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> > index e325aeb..4346d26 100644
> > --- a/drivers/platform/x86/fujitsu-laptop.c
> > +++ b/drivers/platform/x86/fujitsu-laptop.c
> > @@ -725,6 +725,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
> >
> > err_unregister_input_dev:
> > input_unregister_device(input);
> > + input = NULL;
> > err_free_input_dev:
> > input_free_device(input);
> > err_stop:
> > @@ -738,8 +739,6 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
> >
> > input_unregister_device(input);
> >
> > - input_free_device(input);
> > -
> > fujitsu->acpi_handle = NULL;
> >
> > return 0;
> > @@ -930,6 +929,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
> >
> > err_unregister_input_dev:
> > input_unregister_device(input);
> > + input = NULL;
> > err_free_input_dev:
> > input_free_device(input);
> > err_free_fifo:
> > @@ -953,8 +953,6 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
> >
> > input_unregister_device(input);
> >
> > - input_free_device(input);
> > -
> > kfifo_free(&fujitsu_hotkey->fifo);
> >
> > fujitsu_hotkey->acpi_handle = NULL;
> > --
> > 1.5.4.3
> >
> >
> >
>
>
> --
> * Jonathan Woithe jwoithe@physics.adelaide.edu.au *
> * http://www.physics.adelaide.edu.au/~jwoithe *
> ***-----------------------------------------------------------------------***
> ** "Time is an illusion; lunchtime doubly so" **
> * "...you wouldn't recognize a subtle plan if it painted itself purple and *
> * danced naked on a harpsichord singing 'subtle plans are here again'" *
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Dmitry
prev parent reply other threads:[~2010-07-04 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 7:20 [PATCH v2] fujitsu-laptop: remove unnecessary input_free_device calls Axel Lin
2010-07-02 7:35 ` [PATCH v2] fujitsu-laptop: remove unnecessary input_free_device Jonathan Woithe
2010-07-04 8:37 ` Dmitry Torokhov [this message]
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=20100704083742.GF32427@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=axel.lin@gmail.com \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stefani@seibold.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome