Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1784933ybh; Tue, 14 Jul 2020 07:19:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKX3//3XmKbsQ6z/oxc6yfxsAU3J3+6c6HskE/axAx3mnikBhJmKaKw1LFCRhAABgjJbGE X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr4617438ejc.348.1594736352504; Tue, 14 Jul 2020 07:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594736352; cv=none; d=google.com; s=arc-20160816; b=PrL7t6QC2ovCf4GZ2CPjsMkhXDk35H0vqyd8oGWq/G9aiZ8reAJvMYzYw0v08qmTXP 1yQm5X1s4HDhpiDXXQU40q6+r2xRKVPmJvrnp8yuYvDYrYSlOCtvPlwuhlNeBVPALUrD 5AsPI4g+lfKIP677FPrmErqXhKzhC6inCF4iY7PckZj6Tt60dZnLCW/YHTANw38co7Zm lMxVUYmtBz5m1YMRZ8BFJ7LRoUS79yRxzAdjs7nBlL3DiRMl2B548Gu3UNIIFl/xaKsf 4BFfj9I6KEoKs6h00+CGpDiRrZEQ/IWHgW+IZLqb92miGxaGpMHDDwGMXuxPHCKf6hda 5log== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=KU2S/SC5NSdlEg45ZYOyc4soHLNSlPGGiMjTYUISP2c=; b=v+mhAKNL2M6YXYO9dfm0Lno6DdacIiUaR9JKFlvq8boBS0oNJ2d7bbXpYj9J76JX7n npIPCtFlCtqgHmqk6VX2xJhpW3XFDb0avXlhInWJPqH0oXmqz0qNZZFEntagSxFdTli5 QQvwBfuZnkIBaRYciFHKI2AKB6rP5B7v4ZTF0A3qX1SLdJn+wyswZ1Xu1hHntOzGo9hy qPYnDTubhR/oi3fNpxP5rH8r6SitylaqsQtKXSjUw08xT2JWxUN4fMo1Fu3YA7MYrZae MZgs+v4R1RYPxqHgYRXNCamjr71E6LqZjPV0VRUrmFN/MLuqINluqrDwROMPHfi0i8P2 V4ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si10558870ejs.541.2020.07.14.07.18.46; Tue, 14 Jul 2020 07:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728493AbgGNOQS (ORCPT + 99 others); Tue, 14 Jul 2020 10:16:18 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:6915 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbgGNOQR (ORCPT ); Tue, 14 Jul 2020 10:16:17 -0400 X-IronPort-AV: E=Sophos;i="5.75,350,1589234400"; d="scan'208";a="459696777" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 16:16:15 +0200 Date: Tue, 14 Jul 2020 16:16:15 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Suraj Upadhyay cc: davem@davemloft.net, kuba@kernel.org, linux-decnet-user@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] decnet: dn_dev: Remove an unnecessary label. In-Reply-To: <20200714141309.GA3184@blackclown> Message-ID: References: <20200714141309.GA3184@blackclown> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jul 2020, Suraj Upadhyay wrote: > Remove the unnecessary label from dn_dev_ioctl() and make its error > handling simpler to read. > > Signed-off-by: Suraj Upadhyay > --- > net/decnet/dn_dev.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c > index 65abcf1b3210..64901bb9f314 100644 > --- a/net/decnet/dn_dev.c > +++ b/net/decnet/dn_dev.c > @@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg) > switch (cmd) { > case SIOCGIFADDR: > *((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local; > - goto rarok; > + if (copy_to_user(arg, ifr, DN_IFREQ_SIZE)) > + ret = -EFAULT; > + break; The indentation on break does not look correct. julia > > case SIOCSIFADDR: > if (!ifa) { > @@ -485,10 +487,6 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg) > rtnl_unlock(); > > return ret; > -rarok: > - if (copy_to_user(arg, ifr, DN_IFREQ_SIZE)) > - ret = -EFAULT; > - goto done; > } > > struct net_device *dn_dev_get_default(void) > -- > 2.17.1 > >