* [PATCH 1/2] hid: hid-pl: handle probe errors
@ 2025-11-19 9:09 Oliver Neukum
2025-11-19 20:51 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2025-11-19 9:09 UTC (permalink / raw)
To: jikos, bentiss, linux-input; +Cc: Oliver Neukum, stable
Errors in init must be reported back or we'll
follow a NULL pointer the first time FF is used.
Fixes: 20eb127906709 ("hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter")
Cc: <stable@vger.kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/hid/hid-pl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
index 3c8827081dea..dc11d5322fc0 100644
--- a/drivers/hid/hid-pl.c
+++ b/drivers/hid/hid-pl.c
@@ -194,9 +194,14 @@ static int pl_probe(struct hid_device *hdev, const struct hid_device_id *id)
goto err;
}
- plff_init(hdev);
+ ret = plff_init(hdev);
+ if (ret)
+ goto stop;
return 0;
+
+stop:
+ hid_hw_stop(hdev);
err:
return ret;
}
--
2.51.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/2] hid: hid-pl: handle probe errors
2025-11-19 9:09 [PATCH 1/2] hid: hid-pl: handle probe errors Oliver Neukum
@ 2025-11-19 20:51 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2025-11-19 20:51 UTC (permalink / raw)
To: Oliver Neukum; +Cc: bentiss, linux-input, stable
On Wed, 19 Nov 2025, Oliver Neukum wrote:
> Errors in init must be reported back or we'll
> follow a NULL pointer the first time FF is used.
>
> Fixes: 20eb127906709 ("hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/hid/hid-pl.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
> index 3c8827081dea..dc11d5322fc0 100644
> --- a/drivers/hid/hid-pl.c
> +++ b/drivers/hid/hid-pl.c
> @@ -194,9 +194,14 @@ static int pl_probe(struct hid_device *hdev, const struct hid_device_id *id)
> goto err;
> }
>
> - plff_init(hdev);
> + ret = plff_init(hdev);
> + if (ret)
> + goto stop;
>
> return 0;
> +
> +stop:
> + hid_hw_stop(hdev);
> err:
Thanks for the patch, makes sense and I'm going to apply it shortly.
Where is 2/2 though? I don't see it anywhere.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-19 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-19 9:09 [PATCH 1/2] hid: hid-pl: handle probe errors Oliver Neukum
2025-11-19 20:51 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox