Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2123805pxa; Mon, 24 Aug 2020 06:01:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkEUXxP9HtAl760VWo4GmVx0kZTuTFvVzN0J6/q2L+rrdK9ada5pXdZIZQwN5IEYA55x1E X-Received: by 2002:a17:906:2289:: with SMTP id p9mr5057940eja.437.1598274093668; Mon, 24 Aug 2020 06:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598274093; cv=none; d=google.com; s=arc-20160816; b=rAVoW7Sh4UPufVPrtl1uFvrnwTRz3PO/yXfZ8A1UeQ657FJo9YgaLwgWKDhXTvAnRy 9vPa0Dr0Iiw8QeNEa6nObKhQq1o6BvBys1Otbf08mXbb+xbsYBVt07MrLncBSXkua0Mg 8rmn0LNp4mVtQ1OA/CiphA5dM4VAqoP20KGHW+XIkpUfgR90FTGtJxPU4X7kdOLNsU26 QURBt5EUJAQ3IRSGw8Mh2fhee8pGf95DKwLxwSW8t2PKAu6tK2lPM9KrclLN4yOghoiB 84smPPuEImA6hBtCUbHPyRXbjoSLiY8/zDEmXt8JIUaZEbu7sQyDn1kPOxUgrIwpMuhk 0aVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=ZVTumOW7ybMZfx5X7F/NnjSEzQZXUjpWKR0UHX2NQOo=; b=nPREth2YbhvCmFWNS6BFDydcC9nxYHtulA1eVcvFBzeRV0rJFfWlfWZaUl/TAXCNpz 0ox2sY0AQY93+VibocsBNxg6QYxcjJaOY4qiFlhNxc5A5NWqFON7ecmsjWg64IvdjEtM xXcR3xDnxYex5IYy/zlk+7MNh7R5RhQ0TnSJltuyFuTLmrdLKD5+xl89o1yTS7K9ZtWs q3pOyv+Lw8q6oRGo63oUkwcKIMffEiembjvlVVsv2NXNzAPtFRZlZgYCGV861HeRe+s5 FZEt+BtaPSm4ZI3jzs8JJNilvvqINVjEvjJR4g6VgVecFMO/CnSVAuWusdseToeVudx7 P5cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si3275478edk.240.2020.08.24.06.01.11; Mon, 24 Aug 2020 06:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbgHXM73 (ORCPT + 99 others); Mon, 24 Aug 2020 08:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbgHXM72 (ORCPT ); Mon, 24 Aug 2020 08:59:28 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B8ACC061573; Mon, 24 Aug 2020 05:59:28 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 262F01281D748; Mon, 24 Aug 2020 05:42:40 -0700 (PDT) Date: Mon, 24 Aug 2020 05:59:25 -0700 (PDT) Message-Id: <20200824.055925.508725099038824391.davem@davemloft.net> To: dinghao.liu@zju.edu.cn Cc: kjlu@umn.edu, f.fainelli@gmail.com, kuba@kernel.org, bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: systemport: Fix memleak in bcm_sysport_probe From: David Miller In-Reply-To: <20200824055831.26745-1-dinghao.liu@zju.edu.cn> References: <20200824055831.26745-1-dinghao.liu@zju.edu.cn> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Aug 2020 05:42:40 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu Date: Mon, 24 Aug 2020 13:58:31 +0800 > When devm_kcalloc() fails, dev should be freed just > like what we've done in the subsequent error paths. > > Fixes: 7b78be48a8eb6 ("net: systemport: Dynamically allocate number of TX rings") > Signed-off-by: Dinghao Liu Applied and queued up for -stable, thanks.