From patchwork Thu Dec 21 08:58:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anastasia Belova X-Patchwork-Id: 182064 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp279353dyi; Thu, 21 Dec 2023 01:04:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/QvAEWPZWrhlotM6NEggEeA1HD2e4dob1O6aXw4gqTJQewIp6Cw1aOY2PPoMg4kg4g2Dz X-Received: by 2002:a05:620a:1207:b0:77f:3198:52b7 with SMTP id u7-20020a05620a120700b0077f319852b7mr24839725qkj.137.1703149450616; Thu, 21 Dec 2023 01:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703149450; cv=none; d=google.com; s=arc-20160816; b=zzLkk1VTFvDsr5OseDwnHGwVqBgFU0EApCly+1I/Tt9aFLZcUnNRXQG44CJITmAZDE Wm6lTqTsQsI1DpA+uhFLJCd+f3pnB6ezadhI54H1+h0o+So2iinlSA2is+qlRHZu4CXY zC0kz2zGstylBierFB2GjFbmXQJDoeJyV0ISGjkox+rrtpHE2qaWGs3kCC0nuTkToBxf Lx1TZa9Xfs34UMmidimby8n+dOr3EuKMKv8uVw56NLyvL1P+UEKJ1m4zlo/PTHvPBjJL RH6u7ofuDDCBBwsKesQ+JsoCYUWLOXXOQ6pwMJdBQjWkjdidtrjdwWJL7TJyk4JN0bmq DaLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=dXKltguW8Bo+ic1vfK+aaYUnXCLYKLNPLMHZuSFYx4g=; fh=K8MatwUBwFVfpAS9GM38PurLgIUHMlAOM4gUHNrnizY=; b=tPnJ480RbyqFBNj+mTtL/LMtngMMATeWBvDMt3zgHhKo+Jrv7IFhr63wsAIPp52SCd 22XA0LUcMQb3pGaqV8GaLcWyAO2asCpNirFkUkZDucoeulNg5DKDH9HFFHPOlIiHUjPr +YudXAKlYnPu6GiFKbhFTQJnsylUgF975gy2v3nKR7z/1ZchZyZRPRJe9Zu+LM4GduvB cfdgv6/Da3cpeNOyotAdKZA8Mn6bpaaIkIj0ev/IJE0t7CnDpxy3Jl87jYm/AqSO7Z1r 23+QXkzFoU9yepNdts7Z4oL8nE7IbuX+l27ndX7SMLRw7Gg0yue4xNds+4GeZZXZaQcB zDTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8041-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8041-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d18-20020a05620a167200b007811d78ce90si1079973qko.687.2023.12.21.01.04.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 01:04:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8041-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8041-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8041-ouuuleilei=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 69F241C232AF for ; Thu, 21 Dec 2023 09:04:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 478CF4EB25; Thu, 21 Dec 2023 08:59:31 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) (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 38D774C62B for ; Thu, 21 Dec 2023 08:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=astralinux.ru Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id B9A791868C8B; Thu, 21 Dec 2023 11:59:22 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id awnM1zYKUyd1; Thu, 21 Dec 2023 11:59:22 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 6FFDB1866581; Thu, 21 Dec 2023 11:59:22 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mU5WqeFFNcR2; Thu, 21 Dec 2023 11:59:22 +0300 (MSK) Received: from rbta-msk-lt-106062.astralinux.ru (unknown [10.177.20.25]) by mail.astralinux.ru (Postfix) with ESMTPSA id 93F8A1862935; Thu, 21 Dec 2023 11:59:21 +0300 (MSK) From: Anastasia Belova To: David Howells Cc: Anastasia Belova , Marc Dionne , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] afs: remove redundant overwriting of ret Date: Thu, 21 Dec 2023 11:58:49 +0300 Message-Id: <20231221085849.1463-1-abelova@astralinux.ru> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785881638045682135 X-GMAIL-MSGID: 1785881638045682135 ret is the result of dns lookup. There are several ways to handle different errors (described by switch). So it is necessary to keep the return value of afs_dns_query. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d5c32c89b208 ("afs: Fix cell DNS lookup") Signed-off-by: Anastasia Belova --- fs/afs/cell.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 988c2ac7cece..9a112e03bee1 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c @@ -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;