mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	eric.piel@tremplin-utc.net, markgross@kernel.org,
	dmitry.torokhov@gmail.com, giedriuswork@gmail.com,
	dvhart@linux.intel.com, akpm@linux-foundation.org, pavel@suse.cz
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] platform/x86: hp_accel: Fix an error handling path in 'lis3lv02d_probe()'
Date: Thu, 11 Nov 2021 10:50:03 +0100	[thread overview]
Message-ID: <c6130e0a-8c26-f6c8-acf1-351b41e8a2bc@redhat.com> (raw)
In-Reply-To: <5a4f218f8f16d2e3a7906b7ca3654ffa946895f8.1636314074.git.christophe.jaillet@wanadoo.fr>

Hi,

On 11/7/21 20:57, Christophe JAILLET wrote:
> If 'led_classdev_register()' fails, some additional resources should be
> released.
> 
> Add the missing 'i8042_remove_filter()' and 'lis3lv02d_remove_fs()' calls
> that are already in the remove function but are missing here.
> 
> Fixes: a4c724d0723b ("platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream")
> Fixes: 9e0c79782143 ("lis3lv02d: merge with leds hp disk")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

I will add this fix to my tree once 5.16-rc1 is out and
I will include this fix in my first pdx86 fixes pull-req
for 5.16.

Regards,

Hans

> ---
>  drivers/platform/x86/hp_accel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
> index b183967ecfb7..435a91fe2568 100644
> --- a/drivers/platform/x86/hp_accel.c
> +++ b/drivers/platform/x86/hp_accel.c
> @@ -331,9 +331,11 @@ static int lis3lv02d_probe(struct platform_device *device)
>  	INIT_WORK(&hpled_led.work, delayed_set_status_worker);
>  	ret = led_classdev_register(NULL, &hpled_led.led_classdev);
>  	if (ret) {
> +		i8042_remove_filter(hp_accel_i8042_filter);
>  		lis3lv02d_joystick_disable(&lis3_dev);
>  		lis3lv02d_poweroff(&lis3_dev);
>  		flush_work(&hpled_led.work);
> +		lis3lv02d_remove_fs(&lis3_dev);
>  		return ret;
>  	}
>  
> 


      parent reply	other threads:[~2021-11-11  9:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 19:57 Christophe JAILLET
2021-11-08 19:48 ` Mark Gross
2021-11-08 20:09   ` Christophe JAILLET
2021-11-11  9:50 ` Hans de Goede [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=c6130e0a-8c26-f6c8-acf1-351b41e8a2bc@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@linux.intel.com \
    --cc=eric.piel@tremplin-utc.net \
    --cc=giedriuswork@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=pavel@suse.cz \
    --cc=platform-driver-x86@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®