Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5990958ybe; Tue, 10 Sep 2019 11:50:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ2ubxgr/jC/aXnV1xHZXTk/FBg2q5yAB6SUYXSX+Nw0Bj00ROOl/RIPKOvzAATloKFotW X-Received: by 2002:aa7:db5a:: with SMTP id n26mr653691edt.171.1568141449611; Tue, 10 Sep 2019 11:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568141449; cv=none; d=google.com; s=arc-20160816; b=BGP12swjBHtheO73t7XNDzwgoXkzqydn++MpkS08e6TD5QWUjUP147AsGiKNPNDvLe SW2RwawPndt/DjLr3rRzLXZOIr4s9AAKRTMUfj2CmFX6O5SC7UfLDSdnMh+Rk6V49xaK 6xaVH3yQefMUd+09FO1b6tPX7FZhQfvk0wvjJFl1wXKJbeKfHAZ7xI+zPHqC/hrdR40V ydXZIHEeB3tJ83/4Qmx3eoj5/pUJz0Xdqvfv87jnp4DOu3xPdDboTuv7Fv2f9ujU6zma hMQ3i8ec5Uzst1ajd6dcethuT9+O0e3M3BA1Zcxc6nSbbgeuSnaP2+ZBTwHr+B6xE7gN Ykfg== 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=4ZM7Q4WSo04CpFmUeLddXMBSgVoyZnaHplGJY3ziXDg=; b=soGQsgC9mtEUnz2Xsere1yWly6HXsn++Pjtkyq4tkbcJhL9jbV5fEFOB4imCV8Wg0z 2LkOKdWL13Y+d3Lwmuw/I2Wwo+fOjGiI4bDltkYDJp6D7miEknXjQihYvIwVudUv7iHw AKrvt9ugKcl3PoHyK+9PnU0DqTTKpkjlkms4MHqydjhxHm+mCQAF5Hw7YgXvRUH2gxcU Euio69tPmb0j2gOwp0UNgakZFhNCmnXi4q6aMq/2uL7NbvkJIHXx+L1p9s2Grc2WTR9W ACq3oJq9Y/MKIeTvUmUaQOVs157b6WQhGUtV8Wq94Pw9ZY1/ZOrDjASLCiHh+Ttkg5q/ F6zQ== 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 k16si5097025edq.221.2019.09.10.11.50.25; Tue, 10 Sep 2019 11:50:49 -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 S2406456AbfIJG4W (ORCPT + 99 others); Tue, 10 Sep 2019 02:56:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2201 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732669AbfIJG4W (ORCPT ); Tue, 10 Sep 2019 02:56:22 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DDE2491D75819BC1BAC8; Tue, 10 Sep 2019 14:56:18 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 10 Sep 2019 14:56:09 +0800 From: Mao Wenan To: , , , CC: , , , , Mao Wenan Subject: [PATCH net 1/2] sctp: remove redundant assignment when call sctp_get_port_local Date: Tue, 10 Sep 2019 15:13:42 +0800 Message-ID: <20190910071343.18808-2-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190910071343.18808-1-maowenan@huawei.com> References: <20190910071343.18808-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 --- 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 9d1f83b10c0a..766b68b55ebe 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