Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1707877ybe; Wed, 11 Sep 2019 20:47:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4ioEwoLfB3329Cnm3t1yFznXvW50v7oTlJWCBKnemLNdBQyWwQTapDvP3IJom0//UbY0i X-Received: by 2002:a17:906:7f91:: with SMTP id f17mr32007596ejr.125.1568260048984; Wed, 11 Sep 2019 20:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568260048; cv=none; d=google.com; s=arc-20160816; b=vzkND2DtXGlcD9jMOMVj1DshTC/V9aXlOZwuiO2wmfpYFIPoczc1cEIDfkU/Arf56y vbQoMzhHz5ALiRbnIsF8h6wSoolxQ9cKt56Gk+v/YWcIOHRHdFvKV/ztp21WxhNPIUry b9BNpxHlXLZ1KqfAbHZZsRztEbe2Ad4smiIe+a11dd8/RwBTpv5sixeDTTnxdAGuA1yN IPvt7eXq+Opj9b9Gl+YpiDCeDT2IpAoXNs3JmjIWCGVnG7+YCE1dnxp1L1B4qBCi0BQB g6jWfJZaC+nulPotAjl0YxWKTd0XSueniPFQwPv8+3iUUVvZXPbGwc3HlsjdlLxqzSaA 6xWg== 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:date:subject:cc:to:from; bh=EQrY7QcpSZzDgHNOv//bcD8mOq57kIJDQnU1TdNtY78=; b=gwLgSl0jmwo0HzLqFWnfnad5qs0yR63qTCEJ1K/VxI2IomN808YSDGyD4Wrq7HQy1z gqVv9lf7oyUTM34YN+Kb+lDmAYWjW3u6A8dSrMcEHW8+JBZaBgFW/MoqHrIhPnl2I++2 ytAXN2Z3oH4E8QiDqthjM2kvynQAGF5VuXIHKPrTrLmVBdiXGOmwpWphwNZjDw5OHk1g /LDPPXia0OQ8a7KiDlo+H/zNLEw0Pykg597JRWqdlFs56obhWNoC0oyE8tHlMIPEoJY5 dRs9b1Rfvw+WKgXl5p3AO8QyycPfbbVs3DX4wms07xkzrOCjmGSmCuK0rPc+tugnwFCI SfNQ== 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 w2si14737369edc.386.2019.09.11.20.47.05; Wed, 11 Sep 2019 20:47: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 S1729860AbfILDpK (ORCPT + 99 others); Wed, 11 Sep 2019 23:45:10 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2268 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729752AbfILDpF (ORCPT ); Wed, 11 Sep 2019 23:45:05 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1167E92762D2E5FEB2E6; Thu, 12 Sep 2019 11:45:04 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Thu, 12 Sep 2019 11:44:52 +0800 From: Mao Wenan To: , , , CC: , , , , Mao Wenan Subject: [PATCH v2 net 2/3] sctp: remove redundant assignment when call sctp_get_port_local Date: Thu, 12 Sep 2019 12:02:18 +0800 Message-ID: <20190912040219.67517-3-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190912040219.67517-1-maowenan@huawei.com> References: <7a450679-40ca-8a84-4cba-7a16f22ea3c0@huawei.com> <20190912040219.67517-1-maowenan@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are more parentheses in if clause when call sctp_get_port_local in sctp_do_bind, and redundant assignment to 'ret'. This patch is to do cleanup. Signed-off-by: Mao Wenan Acked-by: Neil Horman --- net/sctp/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 5e1934c48709..2f810078c91d 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -399,9 +399,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) * detection. */ addr->v4.sin_port = htons(snum); - if ((ret = sctp_get_port_local(sk, addr))) { + if (sctp_get_port_local(sk, addr)) return -EADDRINUSE; - } /* Refresh ephemeral port. */ if (!bp->port) -- 2.20.1