Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5611810rwb; Mon, 14 Nov 2022 07:08:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4rjGglDAZUv4qDCbb6W3cb+HS2X1D0wsRHUNA9hQBxP0Fi9jh4IXy1DUDiMaOvtCjnWFTm X-Received: by 2002:a05:6402:1641:b0:461:a130:ea33 with SMTP id s1-20020a056402164100b00461a130ea33mr11694416edx.51.1668438526315; Mon, 14 Nov 2022 07:08:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668438526; cv=none; d=google.com; s=arc-20160816; b=QA6rXXk9lzgbWyfu7/HnNNDN+GdCINPkoDV1nyTH69vv+Sf7bLFi+FR4aJGGbbi8+K v7bij2KghvBcWdNdmEoUS+3U8nBd2ZPrlnOH7GQaXKigo9t+r4XkmRxcKAWnGCB/0tX4 NnU6BTElx273ySIHyV0ikdDsAjZAzhNFP3RI7CAUrRSfueClsmQNatkebyabtuPn1KaF 8uxAh7F+lOl9DfxJhkb92ELG29zrQnaT2s23hPOnEmoCaucOaDw0ri2x136cfBPoqh5l HDbOKrCgPExnTALzWslFqUf9eJSYXOwQaPqewMKE5vWwzO1PnN3q4VgjFg5MkOwvZEz2 diSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=qyw47U24TWDBz8CJVtfBJxT/MJ3oBZ/HhYS5KECXfBc=; b=iFns5QSAHjnBe+WPHTM4uM5YBE9NDEpid0Tuywcm/7IX+/useRRqIT9qaXP7yELm2T 8M/ahwkarOwGDJlmsNNcwrf0p+nDKzLFPK4kdDsssCr7a11UAvSdTWrsvR2quLWoc++i e5vXMC8kPuVZESPQPyQMmxbKLKgPJbHe8ba4fmYIyw6WKvkmwZqria4HB7flstuqgdxt 4mn3E2XDZWOHy5M47eG/JmkOtmzVqvsQWuHQoLlP9drBMSquUXZI8T01n6LUGccCemrc ax5Zqi5aVrxeo7egEZCavXLqmSGdyHSfVveWpRN54xiNg4ZofAUdASm1+1Kq3LNGlTqn oMxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G2jssB5y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd23-20020a170906b35700b007aac98ec3dfsi6418054ejb.303.2022.11.14.07.08.20; Mon, 14 Nov 2022 07:08:46 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=G2jssB5y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236617AbiKNPDs (ORCPT + 87 others); Mon, 14 Nov 2022 10:03:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbiKNPDo (ORCPT ); Mon, 14 Nov 2022 10:03:44 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C398D1C5; Mon, 14 Nov 2022 07:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668438223; x=1699974223; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=4H5eSaMts1gBtG6QlF6k0Gn3KiUD0FXVxmalZTJiFSY=; b=G2jssB5ypTanuaiy6XMIFeZz9xAcxJi9evR8V32qO7mMWxYSzGYsyeF5 oYIE5VMcCLKAvAlJiujk9tmHfmqpFLkfe52usO80d/u82P78WDwL2ozeJ 9ffO1E59QaP7mUsEckAo/CZu5dYlsF35pvLskCbYV+ZXN9kcWkB24S/ZF nmQLCEGnORY41dORYPS2pjUEWwkQiG/HvVFLpAmbtXf8vObQ973V/+tMf +JnKH2bcTxTg+n7yqFWTR3tkTxOQuNNw1UBWNunInuFqDqZpHow4ORm2R gvL++kZIGLb4M7jHjJeXmSCZik+/HEOL5dszcMirK+H+pLcFNNzO1FG/1 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="292385337" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="292385337" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 06:57:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="727550238" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="727550238" Received: from mylly.fi.intel.com (HELO [10.237.72.171]) ([10.237.72.171]) by FMSMGA003.fm.intel.com with ESMTP; 14 Nov 2022 06:57:11 -0800 Message-ID: Date: Mon, 14 Nov 2022 16:57:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.1 Subject: Re: [PATCH 3/3] can: m_can: pci: add missing m_can_class_free_dev() in probe/remove methods Content-Language: en-US To: Zhang Changzhong , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Raymond Tan , "Felipe Balbi (Intel)" Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1668168684-6390-1-git-send-email-zhangchangzhong@huawei.com> From: Jarkko Nikula In-Reply-To: <1668168684-6390-1-git-send-email-zhangchangzhong@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 11/11/22 14:11, Zhang Changzhong wrote: > In m_can_pci_remove() and error handling path of m_can_pci_probe(), > m_can_class_free_dev() should be called to free resource allocated by > m_can_class_allocate_dev(), otherwise there will be memleak. > > Fixes: cab7ffc0324f ("can: m_can: add PCI glue driver for Intel Elkhart Lake") > Signed-off-by: Zhang Changzhong > --- > drivers/net/can/m_can/m_can_pci.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > Reviewed-by: Jarkko Nikula