Message ID | 20240211150916.4004-1-d.dulov@aladdin.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-60824-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1969317dyd; Sun, 11 Feb 2024 07:11:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVYfKHwUvSS1huK6+/mO7mLG9WeeLnOjTN7+ZB0GmlXbXhkP4tr2ESsdMez6e7BsFgWvBwBoaQp/KAH55N03JETMdorXw== X-Google-Smtp-Source: AGHT+IElhG05oud/lcAXIzs6ySRYyZZsr502MRZnp7dMrltrrE20Ciu32/vzDoaH9Ug4IqiGp+cs X-Received: by 2002:a05:6808:3086:b0:3bf:f4b4:cc28 with SMTP id bl6-20020a056808308600b003bff4b4cc28mr6346245oib.48.1707664269152; Sun, 11 Feb 2024 07:11:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707664269; cv=pass; d=google.com; s=arc-20160816; b=VZ72ZCvDmXYKeigOEgBDE9GXWvneaOsuxYlxQ7eP9KlbAe1lmTz+o1EwArn1P+AuH7 aSVeYtg3OmGaWxvZHAF9FO1jAWU7N9PXH2VyAj7WXDBqHnQP9rEw2e7+806lnoLW0MKk Shp0ems56Cqt4SKtwkpmASUGBneq+ZZj3nXfa8okmrBBsxqIKAQMC8NDA8tmzd27Zsuy dbVDYoByie1IWvZAYjNZ4go+wxt9Jp/gPYZ74NLNmk76VfhRKn2KtAoRA/xK9D7K3c5t T55S+I049IRyE2G7WwBBkvrMZf3Z7ldcD1qthlkuNQDqhb55Ojfu5ipXppwlJml+TVdm PwTQ== 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=WbrBMmwhnd40FvF1HchSrPKISkdzw0DL/UuFLgdxhNg=; fh=l44jtSNgHxEK7XS0x85b7tFkdyHpr2OUDvwFjEqYzP4=; b=UyTc5V70aCQ3dTEoFz8PBW78ZmRvw/OXn3tl9ZAJxeraeTYfZdf06Qz7GaKV2BUmtM OmQ+w9e1Gmb800HFGLRWp4/O0LZbHy4yee/WkDjiJkFWAMh3sbc34vPG3OoVX1yc06to fCdD0QhxbN+dbGruulJ26UyhuAZvOjr3ZC5U7wx523U5m0jgodSebLbtSkMehDyv7wQ0 HKmka9aMFbZX8FZV+SOY8kM3ZJfbAnsW39tUp9f69w8Q63wi/Ujd5fWn9avuJ09AC/Dd pyj8ZTXGs4XIieLnIwGZvGSUM6NAydSQbGlwTKJQqugmzUqR9UfNPKJRJgPRxi5KcTMg 4Znw==; 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-60824-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60824-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru X-Forwarded-Encrypted: i=2; AJvYcCXuG1gXZjFCVFeAhPxrqLFHghjsNhSzgRv566h3BUR5X1ZQg8aw5OW0yIeWl8Y1at20PWkRQAKdUnXNQfWOaZkLop1Q7g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x14-20020a05622a000e00b0042c7510cd32si961592qtw.323.2024.02.11.07.11.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:11:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60824-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-60824-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60824-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B764B1C20E7D for <ouuuleilei@gmail.com>; Sun, 11 Feb 2024 15:11:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 454435C917; Sun, 11 Feb 2024 15:09: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 C76F65B5C5; Sun, 11 Feb 2024 15:09:24 +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=1707664166; cv=none; b=hG7LJaWRz8B62k9Khzz9Ey87wTp5vlxFlQBVdbSU2Obz3gcsEd06UAtc53YzVj8ikAQhns3kOam0/Duy7XkSyt84XsKi1PJLgx74OtQh6oPUUnJYN7VNevCpZZqPW//RwgkloyyK7GYQw6+nJ1/NEAeNP+FVyOut4OBoFD5qRwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664166; c=relaxed/simple; bh=2tH5ZuF4m4p1iA/cJL23+8Jw4MvfE7ip9QiRvY/GbEc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BT4+99MXVesb68+RQaMf3rJ/OaDCHtwvI7/WUE8nJyK6wZ8+8UByFWTBcWDG01TdB0OTIjzpNUzAcYP2gg4GPOAR2VmunlyoUx0fsTxL3y6lNdPPO6ZLJ1N15CjlXow1wT7bNYfOV/AIhxHoaHIpIQMtDv1JYX0fx/Z3Z8+t/gA= 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: Hannes Reinecke <hare@suse.de> CC: Daniil Dulov <d.dulov@aladdin.ru>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Robert Love <robert.w.love@intel.com>, James Bottomley <James.Bottomley@HansenPartnership.com>, <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <lvc-project@linuxtesting.org> Subject: [PATCH] scsi: libfc: Remove unnecessary NULL check. Date: Sun, 11 Feb 2024 07:09:16 -0800 Message-ID: <20240211150916.4004-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-01.aladdin.ru (192.168.1.101) To EXCH-2016-01.aladdin.ru (192.168.1.101) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790615768845050010 X-GMAIL-MSGID: 1790615768845050010 |
Series |
scsi: libfc: Remove unnecessary NULL check.
|
|
Commit Message
Daniil Dulov
Feb. 11, 2024, 3:09 p.m. UTC
sp is a result of shifting after dereference, so it is never NULL.
Thus, remove unnecessary NULL check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 42e9a92fe6a9 ("[SCSI] libfc: A modular Fibre Channel library")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
---
drivers/scsi/libfc/fc_exch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 4261380af97b..094d9decbcd4 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -650,8 +650,6 @@ static int fc_exch_abort_locked(struct fc_exch *ep, * Send the abort on a new sequence if possible. */ sp = fc_seq_start_next_locked(&ep->seq); - if (!sp) - return -ENOMEM; if (timer_msec) fc_exch_timer_set_locked(ep, timer_msec);