Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp182529rdb; Thu, 21 Dec 2023 06:26:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpxK8CNZK+Tr5/PtbHlS9DjPhr/1GjPAGT8FPipVtc6ddlvwcXfiP99OPw7mqqBa/yVwrL X-Received: by 2002:a17:902:db05:b0:1d3:c21c:940d with SMTP id m5-20020a170902db0500b001d3c21c940dmr7631563plx.34.1703168786877; Thu, 21 Dec 2023 06:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703168786; cv=none; d=google.com; s=arc-20160816; b=Y3EF6dOvVjH+0bhu5fzTY2glYBiu0TRNtsxmKo9HWAbGOkQDBc86asgZRKkwlWV+Ii ad4i5YjdUWZ4zjDXJixhulk05jzEqR8XtIEOYXZ2WEkHR3mVz4QsS1OQZrKp0Eycqb0r 10ZnUZUR8FOGJfXv72fuO/teN+Ae0sGD/SV5aVrtMvBeF7aLB2MaHD9ByJ6lUmHSGsbx RrNWsT2kz3xVb8CRgnKkE3sDaLBsg4p9qjpOWddw3cZQPGE1xuEF3D5R8XC9s8tNpc8o FjrcmuQJmxN27oalm1ClHlPxVMn6+vYOOL2TskH802bZICz066UUKaqo7Ui4fIS5jH8z LzQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:from:organization:dkim-signature; bh=LxkfOE9TRkgl5fLvj/IAktRXgSqIyb2OVdHrT5FumGw=; fh=gsW9RaQw2X+7hkWo5ljCJYhWsB6BJse7SPnKa+vHXPw=; b=l3Oi4HJxLIfEM2jl++nGAWRiJa6BeQyIyGVcKK06SQWWryeTG66Erx9hCDoeg/buij I3xlyiQBgaWtgdA50EA36cTj4n7448w6ljVzGRG2dkRbaWezolzTAzcJk10LE+Lh7lj6 KYCae2shbf010hBOdT52UjYs5Hvf/EXJbzXmEavFjkPcClyRD+fKhqUe5FcKqJArS/eb qiSdYCWL1yCw8jDq2n5YcRKe5hIkdfUNywJRZ2G33cYoYRVwYwqiBgi3aFRk41iKOR+c Egn53ez4ni6221YuHNTXl0BGa+wfPliprh5AIu4uxp6tQC6cO97JwtA5Iqy8AUsjAH/C 1Kfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IOvhHpn1; spf=pass (google.com: domain of linux-kernel+bounces-8554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8554-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l9-20020a170902d34900b001d0513ec98csi1546236plk.224.2023.12.21.06.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:26:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IOvhHpn1; spf=pass (google.com: domain of linux-kernel+bounces-8554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8554-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B32CBB23877 for ; Thu, 21 Dec 2023 14:11:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1BAF66D6D5; Thu, 21 Dec 2023 14:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IOvhHpn1" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B35C16D6C1 for ; Thu, 21 Dec 2023 14:10:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703167855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LxkfOE9TRkgl5fLvj/IAktRXgSqIyb2OVdHrT5FumGw=; b=IOvhHpn1LbRQAAjRk7Bycs+lJ95F+xEnHErMg5VoGfjpDlQpT93QVLO9FsbkwfG7woawOE zGvYuuCAtubGS/Qm5jiHfnO0kW3Cfqkqv2TZBcbpx4oU4M30ln/isHDn1iHT1L+F92D8Vr lvfe5hjV+9uc5pU2eg0JIRE/OeoQZN0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-ovpxtsK2Oia-sK79T5Mx-Q-1; Thu, 21 Dec 2023 09:10:51 -0500 X-MC-Unique: ovpxtsK2Oia-sK79T5Mx-Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD8FC85A58C; Thu, 21 Dec 2023 14:10:50 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.195.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAFD11121306; Thu, 21 Dec 2023 14:10:49 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20231221085849.1463-1-abelova@astralinux.ru> References: <20231221085849.1463-1-abelova@astralinux.ru> To: Anastasia Belova Cc: dhowells@redhat.com, Marc Dionne , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] afs: remove redundant overwriting of ret Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1660753.1703167849.1@warthog.procyon.org.uk> Date: Thu, 21 Dec 2023 14:10:49 +0000 Message-ID: <1660754.1703167849@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Anastasia Belova wrote: > @@ -409,7 +409,6 @@ static int afs_update_cell(struct afs_cell *cell) > if (ret == -ENOMEM) > goto out_wake; > > - ret = -ENOMEM; > vllist = afs_alloc_vlserver_list(0); > if (!vllist) > goto out_wake; This isn't a sufficient fix. Yes, you're right, we need to keep ret - but we do need to set -ENOMEM if !vllist if ret does not hold an error. David