From patchwork Mon Dec 19 21:36:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 34787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2633838wrn; Mon, 19 Dec 2022 13:55:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DxNTqPBmkuWTzEukBDIqIrbhJcZeYo2t0EhN6J9FE0JBplF253eqAJ7VpbxxBypAuMyiQ X-Received: by 2002:aa7:d4d6:0:b0:46a:a94a:e424 with SMTP id t22-20020aa7d4d6000000b0046aa94ae424mr38385320edr.40.1671486921385; Mon, 19 Dec 2022 13:55:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671486921; cv=none; d=google.com; s=arc-20160816; b=HYtEynjlCvpmHPqa9ah5dVR+iy3sl2X/eD9YDB9lYl/uyccLBO8pEcmALjv/0zQPhz ANLBHj6eCsG4GurrtyhvBRtfqhN+ncEScUAeyuJXxhX+kRfKQrUV03HVk5AHqHOuSuu6 YkQwrSdygbJH5+IuaNabmRfWzowdOYqFWYDyzf3bDcw50shc9DhtnHrTQ3q4RByewVUM xXYcVD8DN2rpmrZAtVZf5lUJs7EYhwAGRKDgtNztBcK/MZbvCzCFpZS/98QH1Krn9TBW Abr3yUFdD94mwxRb7rGQmot3GundQ3OOD9gcbkiCP36QQwRfih7wI+Tgnh4dNm/nO2F8 O4Ug== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a056402278a00b00461d2ed78acsi8768477ede.378.2022.12.19.13.54.55; Mon, 19 Dec 2022 13:55:21 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752681069960764387?= X-GMAIL-MSGID: =?utf-8?q?1752681069960764387?= 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);