Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7254261ybi; Wed, 5 Jun 2019 14:05:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpAunHUo7u/mr6wSRMAhbR63CglokC8VsCS7UqDxEwJkNZwh1JMXwQKyvlGGT/3Al3c1j4 X-Received: by 2002:a17:90a:b908:: with SMTP id p8mr18684108pjr.94.1559768710352; Wed, 05 Jun 2019 14:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559768710; cv=none; d=google.com; s=arc-20160816; b=rnVzHIlXQqBsqz8nev/4VVeadDEZN8G76JO2/5PPtcFsWtUKuYA7S2wtalHIsSIu0D vW2InkJD3eMwBP57INUUrogfiLHtdT0n04h5GcpQ3g2t1Ne8vR0wv1RT+LaD1WuoR5Im i9J7EX9q92179DVAM0GSc6qPyo2+Bj4+/O+NyfcTt36ksaf1rp4grMCxb8/o6cY/zEft TOHVqSQCQzhfXWw6fOTqTH+R8JITBRUqyP0LqA8WMX5Km/YtOW2eZagLd7x/tQUPE0JB uRx4wstCwhP3r+teVWwtERGGXruePKXV1lWuu1jXXNWniRt2o8gSgjX70kY1y8URV/QI OPgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=RduQoejXHYI+TOdaRhUE5+Q/wRSrCZiCnse/DPixDn4=; b=GE+YtbR1H1M0KBbWtByQ0vF+1+YziLEBJNAhG5Dke+mB8arDaN4HZLQin+5+9KMfWa X08izKQkFwRZ50NytKSv0h4dhwV3tubnKw8ViVUm7KIAVwIR1uIuO4AflqjhsoLfWYgV teHMxE9gBguw8mCBaddMoMFJpHfgU+Y+FM+GypX57L4uJ42Ofj6i1y2MDVuBGNudN/iL S92LacwdLA8l2hQXGTv5moR65BoW7Yxl3lDm3mRRJKmzOWGsLkrmwx2PUcGlQgqXKJm/ 9/EX8gODNqVHL38TD4zg4O5bFWpYOWA29dgL+epFvsEfGI3dWAeXrdj5J/rsrRLCxSK1 iqWg== 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 w127si27385337pfw.200.2019.06.05.14.04.53; Wed, 05 Jun 2019 14:05:10 -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 S1726655AbfFEVDp (ORCPT + 99 others); Wed, 5 Jun 2019 17:03:45 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:35409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfFEVDo (ORCPT ); Wed, 5 Jun 2019 17:03:44 -0400 Received: from orion.localdomain ([77.2.1.21]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MAOa3-1hOPWF3A4Z-00Bt1P; Wed, 05 Jun 2019 23:03:36 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, davem@davemloft.net, linux-sctp@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] net: sctp: drop unneeded likely() call around IS_ERR() Date: Wed, 5 Jun 2019 23:03:27 +0200 Message-Id: <1559768607-17439-1-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K1:RDhO0c91eGQhuPk7OHIf4MDNfPy3l+iTaNUx9a50PPTwDQpqrjO 55dpkrt7kgxoqVnayYCOjOUfNg+9htcpuYwvkAJR9gslNxD/RqsECCRyiL0zteRLcDlns2e TRJRVVhzG9ZWaDjd658fE9Q9zcXTW7xd1x3hAKD3RUzVVTvWFGb5PSGvbwLELA9oXMcRZu7 vP60tsLC8L+Zk/om8bEdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sKdrp2sgGcQ=:pvV0FiTPX8gMA1+4M/9k2f SQZ9FRTN2nzdQjrrAiIwDQOcMvGS5UU5GpALTkIm7l6gT0UQVvAiwdlCxbriciOLFLP+f5f/2 oZWRx/CznID8gGaxEI15X3hIsZXjy9tMTjdddXkzcxMBc/p5/vKi49OhaPfsAWjenWlCt9tgt iFnody6EFvOsVzFubjoajOtU18IYuDLeI1cbWzK+RQamOhCz5Q3Ucs54k1cOAZoLLSKXNB89z Hw6h1jEaUMmnJwmcYuEYU2mZpzNluZFgMIWZwwqLgOsvE1222DP8YQbWSFNdk0P5MOb8Uq68E 75r+C4X580HDQsiMeW3jf+CZh9YzoXm+e2BJ9xwq3mTc2mfHr7JSxNxU9lNXdU0qe7zsoHzWn 04vH9A3hHD1We9M9LetXZ6aR/nbJ8ZfMs9CBkQasEqeXO/QpeEnAR3y37IswHJMerxPq7RVVr cEnMVDCRkkaHhZFvt3nuBf5ErYyFWF+X9SU7HNSMPDiXmV+9z+ir2pFhWExZC0AXLhEp1TCdo l4+HnWs/VERXoq1B7akgU2p3FjDY5iOtSUAcNBYPZiYbIbGq99bs0XxYDDarvjbkvALVXKw7G G9LBNWTvwuj4HefRDvTkEyALCwu+Xp0Xu49/fQ40x2J72yiwtMgqrWLjumSYSUMHopj9e4hcw kxGqIAWCzjzkV/Sk7PulRGphC/K1hyvKNeP1ZYok78CMw4lpDu53G8A/NxQeJM4WYRW4HxBeu V3QXqsxzIa4IGcun/P35h1OYvJ5+krxd2gWC7SxDAIPWoXvQPraqY3zIoig= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Enrico Weigelt IS_ERR() already calls unlikely(), so this extra unlikely() call around IS_ERR() is not needed. Signed-off-by: Enrico Weigelt --- net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 39ea0a3..c7b0f51 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -985,7 +985,7 @@ static int sctp_setsockopt_bindx(struct sock *sk, return -EINVAL; kaddrs = memdup_user(addrs, addrs_size); - if (unlikely(IS_ERR(kaddrs))) + if (IS_ERR(kaddrs)) return PTR_ERR(kaddrs); /* Walk through the addrs buffer and count the number of addresses. */ @@ -1315,7 +1315,7 @@ static int __sctp_setsockopt_connectx(struct sock *sk, return -EINVAL; kaddrs = memdup_user(addrs, addrs_size); - if (unlikely(IS_ERR(kaddrs))) + if (IS_ERR(kaddrs)) return PTR_ERR(kaddrs); /* Allow security module to validate connectx addresses. */ -- 1.9.1