public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: jikos@kernel.org, bentiss@kernel.org, linux-input@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>, stable@vger.kernel.org
Subject: [PATCHv2 1/2] hid: hid-pl: handle probe errors
Date: Mon, 16 Feb 2026 14:44:00 +0100	[thread overview]
Message-ID: <20260216134958.260648-2-oneukum@suse.com> (raw)
In-Reply-To: <20260216134958.260648-1-oneukum@suse.com>

Errors in init must be reported back or we'll
follow a NULL pointer the first time FF is used,
because plff_init() initializes the private member.

V2: resend full series

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


  reply	other threads:[~2026-02-16 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 13:43 [PATCHv2 0/2] hid: hid-pl.c update Oliver Neukum
2026-02-16 13:44 ` Oliver Neukum [this message]
2026-02-26 15:06   ` [PATCHv2 1/2] hid: hid-pl: handle probe errors Jiri Kosina
2026-02-16 13:44 ` [PATCH 2/2] hid: hid-pl: eliminate private debug macro Oliver Neukum
2026-02-26 15:07   ` Jiri Kosina

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=20260216134958.260648-2-oneukum@suse.com \
    --to=oneukum@suse.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=stable@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