From patchwork Sat Aug 26 17:42:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13366640 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 070BBC83F18 for ; Sat, 26 Aug 2023 17:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjHZRnK (ORCPT ); Sat, 26 Aug 2023 13:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjHZRmj (ORCPT ); Sat, 26 Aug 2023 13:42:39 -0400 Received: from smtp.smtpout.orange.fr (smtp-21.smtpout.orange.fr [80.12.242.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C12D10A for ; Sat, 26 Aug 2023 10:42:37 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id ZxInqYKe17qfuZxIyqGrQm; Sat, 26 Aug 2023 19:42:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1693071756; bh=7y+p/DCWdTxhVS6H8ySh3peTTL6wMdtAAIrdbcIWb4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=frMIY+U3jYd67SIhM2sjs9OvrU/cK1usM8XRDY1Flt9vM7MSmKz1+ErUOPXRuNT/s Djks6HowBBl0Fr4RrprVqoivZ4eigj6txYAl1mLOLpCG7DoiWON4J+DFTV5yLk9zRx IUb4k5D4BuEh4NFfBZaZop1ZglbdAEoE5jbiCldwOBrhWwLlYdVUqel94cCL4oq2J7 LbKwbWG/hB2gnnj4X8xLcm+nsURLr0VNC8PqEjySYyOlgSmW2Lrbv8F1CvDG3KVXFT lLuDGQiGSYPtgB3XPrtENT5CibTJLs6bFnFTMOZ3WXuPiuvVWkFLHNKuZjv831hCK5 Lvp8arqXjblxA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 26 Aug 2023 19:42:36 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: rrameshbabu@nvidia.com, jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/3] HID: nvidia-shield: Fix a missing led_classdev_unregister() in the probe error handling path Date: Sat, 26 Aug 2023 19:42:17 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The commit in Fixes updated the error handling path of thunderstrike_create() and the remove function but not the error handling path of shield_probe(), should an error occur after a successful thunderstrike_create() call. Add the missing call. Fixes: f88af60e74a5 ("HID: nvidia-shield: Support LED functionality for Thunderstrike") Signed-off-by: Christophe JAILLET --- drivers/hid/hid-nvidia-shield.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-nvidia-shield.c b/drivers/hid/hid-nvidia-shield.c index 9a3576dbf421..66a7478e2c9d 100644 --- a/drivers/hid/hid-nvidia-shield.c +++ b/drivers/hid/hid-nvidia-shield.c @@ -1076,6 +1076,7 @@ static int shield_probe(struct hid_device *hdev, const struct hid_device_id *id) err_haptics: if (ts->haptics_dev) input_unregister_device(ts->haptics_dev); + led_classdev_unregister(&ts->led_dev); return ret; }