Message ID | 20240211151113.4171-1-d.dulov@aladdin.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1969883dyd; Sun, 11 Feb 2024 07:12:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWGlUDf8sYMou1hX/WEoKTLmkg4yUuIqznSJNaQV3H+SkOQ4qfCxUMiJj/XmwssA/rEO7dc8ZlcohyXDMjNBb56zUzsvA== X-Google-Smtp-Source: AGHT+IHFySiOVOpZ+yBs9VFoM1FNoLuLxm85exI8VUKE+D1vRtia2oZ1P3G7ALH7bzuoMSBB3vQ5 X-Received: by 2002:a2e:87ca:0:b0:2d0:af5f:969c with SMTP id v10-20020a2e87ca000000b002d0af5f969cmr2932885ljj.36.1707664340160; Sun, 11 Feb 2024 07:12:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707664340; cv=pass; d=google.com; s=arc-20160816; b=Af/MRfwraFBeOlidwLlkL4iiigaaDMk4q1JmlB4OX5WMDj8LVAYXcELfb2/QBXsyTN 0QZQ5E/wmotFvkL3PZvkeGpZygEpDsF52Cz2+n6IivNrQl3QwQVuFaw0ZcKxz16BBUb8 YCYFkBHcnobbXDiXQozNZ6kFwxR3gQMBYVQNYUmXiPyPhimVsZozw1OERMPV82CIe6eF VEzLwmJO30Jx8eUGgmSlecLJ2Wo8I4IjtZbnKCYgLNDUAODA0b4c4jci06WldHucsZlF Gyd2D9kSEeaWd9rDWup2wJ60jxG97WlJuJWCUffA7cgx9mbGpktp4KZLb/aiIMVK4oCn uptg== ARC-Message-Signature: i=2; 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=yCsnm2lhkjHsPtF6jrej/DWdx18VBqGk41Zn5PtR3d8=; fh=W8IFzEFLZX0en26Bm/3f8/g0P+poArThPBcRrcggaKI=; b=P6KX6dJkCT2Mig21yhS7SjK0j0ppSWYredGzUhbopVTS1DnsckwwiNaPXY/7Xvlp3j DV/Fnk7AcpR9s81xSgIL3Kkj+WYwAHraT/D3cfN85voAXf8gDkw61KygWyr+g6/ml22Z 6OfiE/AxPGPVqyH171+wtiI9cU02BExMp2EH2xgDps19gx7gY8mzGGfDN0eyNptO3Nox SWrbbDhkJkQHuiaZsi6ZNaq0vr+fR6tK9UAGGTAQ+bljPaaOP1yP5sYwUxoo/Yqz5W+K yFpkLn8XuMxe818BozeTC/Nnd+oCQgcmPldAsIJqQeA49Vp7eBHaCZEAP9+wUpF7qPrF ijQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru X-Forwarded-Encrypted: i=2; AJvYcCUPUEDMoca5VGLO6GJEOOVlTrXKMfd7K8L/lePxbwYZe70YNBxK2fbOloH9H8AWYBOMVuognEZBdSumaAjDQow0nxO8Ww== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h2-20020a056402094200b0056024a4e539si1878349edz.216.2024.02.11.07.12.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:12:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60828-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru 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 am.mirrors.kernel.org (Postfix) with ESMTPS id C03261F21320 for <ouuuleilei@gmail.com>; Sun, 11 Feb 2024 15:12:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A25985C5FB; Sun, 11 Feb 2024 15:11:28 +0000 (UTC) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4111B5A4C2 for <linux-kernel@vger.kernel.org>; Sun, 11 Feb 2024 15:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664287; cv=none; b=X1bM5krCRkLTPrVChORw2pqXUA/C5hgyM+eOb2fYLhbxbxJ6HpkPN5nl/EZfBm2UtgTmmRI7BYaPtvU74ouSFMaMlh00nLCw0mmI7FIzlSGS5a7I5uv6/qnRg00Y8Yiw2AVzZomXl49/7MVHa1dA0lZVga4W/srnwSBXPMahlzk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664287; c=relaxed/simple; bh=DjNQ0iQFYVh5G4R2oz7xLYC1ecakN7+K1vihLv5zVwk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MK8WzkBVRyE4vJ/F/rhTQi1i2RQ0TggS+5qG6xrnJOSO2P8ILN2BisGyJokkelLf8oGJ6mVOPO/j5MBvunyfiGitTooi+UlZCwnP6P9o19IO5lubNXZRKhWHE0n5ZU8I1DwSxXXzYFIbH3WT0GxU/xEWZfjqZhBcIqlv2mTnXoE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru From: Daniil Dulov <d.dulov@aladdin.ru> To: Evgeniy Polyakov <zbr@ioremap.net> CC: Daniil Dulov <d.dulov@aladdin.ru>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, David Fries <David@Fries.net>, <linux-kernel@vger.kernel.org>, <lvc-project@linuxtesting.org> Subject: [PATCH] w1: remove redundant NULL check Date: Sun, 11 Feb 2024 07:11:13 -0800 Message-ID: <20240211151113.4171-1-d.dulov@aladdin.ru> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EXCH-2016-02.aladdin.ru (192.168.1.102) To EXCH-2016-01.aladdin.ru (192.168.1.101) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790615843291768537 X-GMAIL-MSGID: 1790615843291768537 |
Series |
w1: remove redundant NULL check
|
|
Commit Message
Daniil Dulov
Feb. 11, 2024, 3:11 p.m. UTC
cmd cannot be null in w1_process_cb, thus remove redundant NULL check
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 9fcbbac5ded4 ("w1: process w1 netlink commands in w1_process thread")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
---
drivers/w1/w1_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c index fa490aa4407c..402065a0432d 100644 --- a/drivers/w1/w1_netlink.c +++ b/drivers/w1/w1_netlink.c @@ -475,7 +475,7 @@ static void w1_process_cb(struct w1_master *dev, struct w1_async_cmd *async_cmd) mlen -= len; } - if (!cmd || err) + if (err) w1_netlink_queue_status(node->block, node->msg, cmd, err); /* ref taken in w1_search_slave or w1_search_master_id when building