Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4807692imm; Mon, 14 May 2018 13:30:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo5HVCRZHmUT6Sww7hfd9P7ytuh1TbTgXr2Jv2qZjsDlCIOgI4/1wcRx3NL4FAXYLIHm6dg X-Received: by 2002:a17:902:7209:: with SMTP id ba9-v6mr11558441plb.119.1526329828529; Mon, 14 May 2018 13:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526329828; cv=none; d=google.com; s=arc-20160816; b=h3B886YVXOBQslfQpy7yML5POblSXh7rDFt2rZdVPAXTby+g+n9qzdHwGljuknH33i BkdYcKp3vvBk3h/hxPRkD+2aHlM8GEHYyvR/iKZ0a1hTWXbgHYmIQa2nIO6xiJFtQTZp iOR46vZMKz6mYDXre8/If60+Cij0lMI9vXdZSHao5I2ulVQy5qhgcDDeO3IDh+oJeKP0 tEeUFRD72JULy0AuHciBapREM5QwZZ8gXJi/qmKFZVSTsccYOvS/wFtA+yTFZ5GR2Zcq MW27W62EwzV+dsHrHJjyheQaA3FZMv721QMq7WCtGNoMpiY0MndqfKHlP8LzSNAOEYYr 6yfg== 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 :arc-authentication-results; bh=CufG0Io8ArUeIuyIsyq1EZx0WFXTmr+cOQlANW1Z6/c=; b=LWSevg62ekH5tgoKzW5SG0e8yT4srxCX6Jh2rLG4awmsG4D5KPih+RYBrGDo4pv+B6 iNroLAQJ1uma1pycsRq+RhUhLmErKrcMymxFJ1/eNS9YlAS5VQs72bjhbBhKLIcZ9PjB NjoMnKVYHhngtj5Mogqwm7KzoCkFc4H9kAS2mQj+E5a4T4Q2kSHX3QYNEIJAqRSQhsSu j8C1o3Iln4ttDdfL+lpHcOx+rb0KwMCp6hQmtuRp8BGXFxelfjajAgEnB8rVIgduE2a+ lmaVgHQRQ8Ovhtw3XXTQL7hKYGCZnjPGFSGtdI0iKofn2CJzsq1dQukyugVfaWDPjR2w jkjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9-v6si2687655pgp.508.2018.05.14.13.30.14; Mon, 14 May 2018 13:30:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbeENU3s (ORCPT + 99 others); Mon, 14 May 2018 16:29:48 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:41410 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751962AbeENU3q (ORCPT ); Mon, 14 May 2018 16:29:46 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (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 2168713D18506; Mon, 14 May 2018 13:29:46 -0700 (PDT) Date: Mon, 14 May 2018 16:29:45 -0400 (EDT) Message-Id: <20180514.162945.673218440357756147.davem@davemloft.net> To: tarick@google.com Cc: tariqt@mellanox.com, gthelen@google.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info. From: David Miller In-Reply-To: <20180513233845.135290-1-tarick@google.com> References: <20180513233845.135290-1-tarick@google.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) 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, 14 May 2018 13:29:46 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tarick Bedeir Date: Sun, 13 May 2018 16:38:45 -0700 > Avoid exiting the function with a lingering sysfs file (if the first > call to device_create_file() fails while the second succeeds), and avoid > calling devlink_port_unregister() twice. > > In other words, either mlx4_init_port_info() succeeds and returns zero, or > it fails, returns non-zero, and requires no cleanup. > > Fixes: 096335b3f983 ("mlx4_core: Allow dynamic MTU configuration for IB > ports") > Signed-off-by: Tarick Bedeir > --- > v1 -> v2: Added "Fixes" tag. Applied and queued up for -stable.