Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3159306rwj; Mon, 19 Dec 2022 14:04:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtNe1fs2MqtK9JufcJs56SN75EmzrqKg5+uxZB5MBCKnbCN1vD2QK+gAgh8z/ym6cD+QkCZ X-Received: by 2002:a05:6a21:7897:b0:af:a276:2f94 with SMTP id bf23-20020a056a21789700b000afa2762f94mr31343138pzc.35.1671487479596; Mon, 19 Dec 2022 14:04:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671487479; cv=none; d=google.com; s=arc-20160816; b=Qi5mYjBjHNSjZ4gLbfO4Oc7S/p4xnDgLmcvfyfNpgeADZaQHT3qunIVVRvmvFHBx5D 2dZtyiBMcZVE0MDyhcrzQJ7Yp1cEzHI+hofBPylXK++UkRqtOsPSdfnGlNdMNUI55Dr7 vNvx7FZgBVNFWLPx+yEFHTqZ8Nk4886TsbKvLLDNnPOpD5cv0O9lzujEMswiW5iLMDak T6YLAZfM0oqi/Uk/6M8XmepHDlo7BGWRSo7vlwzx9hcLLOlitv3OAr/S1Bh1c1XU4hc8 fPT9JSuZq82qb8NJtR7dk+YGazPYyKlY71EJNMD+uHFXO2WD6MLkM+dC//aPsgbekutA lhUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3HG17qFE5lDikWTXPio1Id7eEUNezJXKMk8IEZ6iO7Y=; b=iWoAK5BsJHxSXAFl3MpRzcOMRgD1F2LcamRiWcF4tMyqbGMWeD6NHTdmFoA36j3jMs quF8cP/3ZNG9eM7jgPVHasfGPg9/7D67FGB/UGrY5PNtC2EdXAuA9dbF/C2CYrcuaTPF Nl69Ab3URUd+PJL2s5iO1rKAao3NjBqCvekiUEysn2xTCWwetIclTI6rBLnooIkn8R7a bNdB0pmU6fQOsGxCZd6bABKcAnHCUX7AsCc9S/AAlqEDR5bvBWDIBXhpoqfIKciVx+Nd sKXFrmlTa9+oN76EkfPckHD5qHy0K57WP/l19V8KktPpwLmp00os5fxrSGO0ayMyaz3D M8MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u32-20020a634720000000b0047867fcf9a7si11557192pga.541.2022.12.19.14.04.30; Mon, 19 Dec 2022 14:04:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbiLSVhA (ORCPT + 71 others); Mon, 19 Dec 2022 16:37:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbiLSVg6 (ORCPT ); Mon, 19 Dec 2022 16:36:58 -0500 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F392B1C3 for ; Mon, 19 Dec 2022 13:36:57 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 7Nodpo3YfP7YW7NodprsHy; Mon, 19 Dec 2022 22:36:56 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 19 Dec 2022 22:36:56 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-input@vger.kernel.org Subject: [PATCH] Input: fm801-gp - Fix an error handling path Date: Mon, 19 Dec 2022 22:36:47 +0100 Message-Id: <2d4f01f3a721b0dcd34669ab01aff9eddaad53dc.1671485791.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This looks odd to call release_resource() for something allocated with request_region(). Use release_region() instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET --- This patch is speculative and compile tested only. --- drivers/input/gameport/fm801-gp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c index e785d36b1926..90ef1935084a 100644 --- a/drivers/input/gameport/fm801-gp.c +++ b/drivers/input/gameport/fm801-gp.c @@ -118,7 +118,7 @@ static void fm801_gp_remove(struct pci_dev *pci) struct fm801_gp *gp = pci_get_drvdata(pci); gameport_unregister_port(gp->gameport); - release_resource(gp->res_port); + release_region(gp->gameport->io, 0x10); kfree(gp); pci_disable_device(pci); -- 2.34.1