Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1800230ybp; Wed, 9 Oct 2019 20:47:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxBSnfOk7KO5iNIrAdarGk5tXK7iSdoM+r/iFfG6USWelkCMN9vqrojh27474fniR1sebJ X-Received: by 2002:a17:907:36e:: with SMTP id rs14mr6135478ejb.280.1570679228302; Wed, 09 Oct 2019 20:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570679228; cv=none; d=google.com; s=arc-20160816; b=kmMobvkg1S8cso8PKuHNDkGpv4PWKhj2B5VLzRfgZzjqdpV6k5zCCjRKJjNy8pSeDl KiF/AN3d8ev3wxTLhOs4FVWIfvfM9xsl82RYCsCPi3+0AqVJkmhLnz7wmm/PMuTUWHuU aGROJzRapZy3+0n+sdBjG7cwRClcyBrkwaut7cBTagdMnk5yQjlTn6nlGamBI4pECm6t hoDwkz2hh4GINJh95dLssIsTCkzw8/pM0Wc6RUNVwZPVEdE+YzCXJLY+dIAquko7AIbt yrT/W92Lvceu8XuibsTVtkI+A8hSr1kiUo2gtsiGqxiyXA357yd2yn28Wh1An+uvA0+q 0uZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=pk0JWxEChmGFgveu0g1p9/6dCWrVrcEa21kK7pUl/20=; b=DPgsvJtcedeX9AEDCvIbHFdVtcGOEyfeqcRMGUoFUDGuFeXTyhFKiTku55rGLAsoB5 JFiFXfglv0aiIhsz0u2Fu/8rl/qkVFZyldoSlBPbCdMj2msIN1AmA8F8TdSxjT3uGNe5 gvT8Y+W5WzpeZydEy2u0ozZKuMV+SFN9DgTJqdESc4uQcuZPLU33OicKO0Rk4kIef973 P8VmROFfWl/0qn4Ugl1T83VeDaCii5+NFG0yvayDuFjsKHJRQl2EdRfYr1aQ/DG3pY8a jfnZU9RwDCVUi7bj8wfkes3U60Z2zFZtsqBWzuh0XctcTLi7vLBjOi15Sx7A8G0ri8YF 2Xyg== 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 f33si2353075edb.281.2019.10.09.20.46.44; Wed, 09 Oct 2019 20:47:08 -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 S1732827AbfJJDns (ORCPT + 99 others); Wed, 9 Oct 2019 23:43:48 -0400 Received: from shells.gnugeneration.com ([66.240.222.126]:58588 "EHLO shells.gnugeneration.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbfJJDnr (ORCPT ); Wed, 9 Oct 2019 23:43:47 -0400 Received: by shells.gnugeneration.com (Postfix, from userid 1000) id 5D12F1A40556; Wed, 9 Oct 2019 20:43:47 -0700 (PDT) Date: Wed, 9 Oct 2019 20:43:47 -0700 From: Vito Caputo To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] af_unix: __unix_find_socket_byname() cleanup Message-ID: <20191010034347.ohjmoivd7f426znd@shells.gnugeneration.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove pointless return variable dance. Appears vestigial from when the function did locking as seen in unix_find_socket_byinode(), but locking is handled in unix_find_socket_byname() for __unix_find_socket_byname(). Signed-off-by: Vito Caputo --- net/unix/af_unix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 67e87db5877f..c853ad0875f4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -284,11 +284,9 @@ static struct sock *__unix_find_socket_byname(struct net *net, if (u->addr->len == len && !memcmp(u->addr->name, sunname, len)) - goto found; + return s; } - s = NULL; -found: - return s; + return NULL; } static inline struct sock *unix_find_socket_byname(struct net *net, -- 2.11.0