Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp69531ybk; Fri, 8 May 2020 18:55:44 -0700 (PDT) X-Google-Smtp-Source: APiQypIVpVKQbXiINZQvyk7dHO/Bg2s/fVSbX6OtJvvpejooQoEGj6r0DjYNyNKpYtShecDCHIc4 X-Received: by 2002:a17:906:528e:: with SMTP id c14mr130178ejm.123.1588989344444; Fri, 08 May 2020 18:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588989344; cv=none; d=google.com; s=arc-20160816; b=S9iZShhlToXX6fWPBObwOkqUuIfvlRhRDYX2/inFtddNt9FoOhhBF22OkOggAzlwu/ wo4boxGyxhmV6goqsr17punDEn2Lq9rYwOIcikhXUGKIjUHGSrrpd4TcxAcLU3u6/Bxy CQ+fKWZXdFjM3IiFFN4WHqIeo1r+BfDlcDPAQsKtHTLy7YXPdTdA7CzpofuVrHJTnv2z 6ool3veFditi+TDasVBGYSAzcQ8G1GLFDM/dmxGZ1hMoguNQLBUCN1uvQqRe9BuTe4lU HED17FumObjR76w+4mDFUF+UGjNocoszpYE1nBcU3dsMQYucSmF79XyXSpupLYk2ZtC7 I5hg== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=0lMLlnRmSrQ6JtDk2YXkUWwEjmcRFRrrKjEnXclWveM=; b=phLdksir7PmLHZgPOAHgpcTdPvqhYMicAKNE2KLQ6XNH2nk6bV7o5BAM9LIANCL3CH WseH9c5SOg/DjcFLTEAduwMd1wAQRRCjWO8T8AaVJdx63Bl31Wiq5q0ktnfn8Dfgb3C9 jzNPQVl9GrYbJVUwy2NuorszCQolpq2KcjC0iTB9jjLhTWBQen0jTijKzF5xl/Qzon8G rKwib2bOAUztOrTmVG81/kfSfdD4zfjicbgt5xeh/mGO+3j6m13rFiNBw1SKqRCbVfce T/iIzpjrBq0zslD4t/lkLu+mIVlU99oHex4FzHU7gMvY1OpMbhzprENRWna4BdkCVdQs sn8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cGn2b3P5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si1932777ejb.16.2020.05.08.18.55.21; Fri, 08 May 2020 18:55:44 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cGn2b3P5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728502AbgEIByE (ORCPT + 99 others); Fri, 8 May 2020 21:54:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbgEIByE (ORCPT ); Fri, 8 May 2020 21:54:04 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C534E218AC; Sat, 9 May 2020 01:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588989244; bh=U+oZAKvfEcBrfRy9eyomxP9xIkvNuHokIR9NHxLx7Zc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cGn2b3P5tW4EYFTSJEN81nzCiav1F+xOpHytKoNr7DJqbCPbBFkFnaFbH9Gk1kA96 tBCcbKMxGr5vccRKF/qQAny0phnH+kO9kQS2zMQkdQBkKFeMDJzVsGNj+47oDxIjlk rvYb2vT9rVgskaDm3E0Doe6mpomM86q5TOYF1gUE= Date: Fri, 8 May 2020 18:54:02 -0700 From: Jakub Kicinski To: Christophe JAILLET Cc: davem@davemloft.net, fthain@telegraphics.com.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths Message-ID: <20200508185402.41d9d068@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200508172557.218132-1-christophe.jaillet@wanadoo.fr> References: <20200508172557.218132-1-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct platform_device *pdev) > struct sonic_local* lp = netdev_priv(dev); > > unregister_netdev(dev); > - dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode), > - lp->descriptors, lp->descriptors_laddr); > + dma_free_coherent(lp->device, > + SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode), > + lp->descriptors, lp->descriptors_laddr); > free_netdev(dev); > > return 0; This is a white-space only change, right? Since this is a fix we should avoid making cleanups which are not strictly necessary.