From patchwork Sun Apr 12 12:06:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 207958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E18E5C2BB85 for ; Sun, 12 Apr 2020 12:06:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3183206E9 for ; Sun, 12 Apr 2020 12:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727022AbgDLMG5 (ORCPT ); Sun, 12 Apr 2020 08:06:57 -0400 Received: from smtp10.smtpout.orange.fr ([80.12.242.132]:31688 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727014AbgDLMG5 (ORCPT ); Sun, 12 Apr 2020 08:06:57 -0400 Received: from localhost.localdomain ([93.22.37.28]) by mwinf5d20 with ME id Ro6u220020cS4cl03o6ulF; Sun, 12 Apr 2020 14:06:55 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 12 Apr 2020 14:06:55 +0200 X-ME-IP: 93.22.37.28 From: Christophe JAILLET To: jikos@kernel.org, benjamin.tissoires@redhat.com, neko@nya.ai Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] HID: elan: Do not explicitly free managed resource Date: Sun, 12 Apr 2020 14:06:52 +0200 Message-Id: <20200412120652.9969-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 'input' is allocated with 'devm_input_allocate_device()'. There is no need to free it explicitly. (add should it be 'devm_input_device_release()' should be used for that) Fixes: 9a6a4193d65b ("HID: Add driver for USB ELAN Touchpad") Signed-off-by: Christophe JAILLET --- drivers/hid/hid-elan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c index 45c4f888b7c4..26c294a7c9ff 100644 --- a/drivers/hid/hid-elan.c +++ b/drivers/hid/hid-elan.c @@ -198,7 +198,6 @@ static int elan_input_configured(struct hid_device *hdev, struct hid_input *hi) if (ret) { hid_err(hdev, "Failed to register elan input device: %d\n", ret); - input_free_device(input); return ret; }