From patchwork Sun Feb 11 15:05:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniil Dulov X-Patchwork-Id: 199462 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1966726dyd; Sun, 11 Feb 2024 07:06:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUqiaGh5Uqe8p0S2Q7mJehDa9d+GAlYid0WriRhP5/iZnUZQTNjrdcJjjcU2P/5nEJO85Uarg1cRlJDzMDRSUiSXgBSLA== X-Google-Smtp-Source: AGHT+IHN7A8etFz5HxxSNjpbigANbR/wE3cxUnhlmXQeo6TVzjKPW/nigcI/ePEzZs66cY1JM4t5 X-Received: by 2002:a05:6214:21a9:b0:68c:c602:d3f9 with SMTP id t9-20020a05621421a900b0068cc602d3f9mr3294453qvc.10.1707663989896; Sun, 11 Feb 2024 07:06:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707663989; cv=pass; d=google.com; s=arc-20160816; b=nOp6YLyz4FXo2ojt55nU/Vhfhqjvjmcnp3aa5Isz6ynR/y3nx9AltvaBuYZNE1oRX3 zbMZ+YntPi7bSb9y/1H1iJR4fbaqkjjbN3vL8a/wQr5WEXfBShfLMY1jH3o7EdO2lPwv PEhK4pN73cEOkrv2kW2c/AVNf8zxb4AjBGtZ1YT6mNvqaV2h7R4vtGDx3IdrdrGgkGiA YFPoZSJZhxLt2+yWIbmUAmTTvQefx07Va8fiOqkOWAcWx6B5rAPWgIBNj5VGl5+9wdbY WDPqo6G4jIa64+vlmE+V87sp5iTX+xvepmZU4nX35JTz/kLLF+OV7pgYwCuY1HYus+ru 4g8A== 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=JiJMNHuWUt27aHbp77MNewC5nTaD1lGRVtCG8jv3klU=; fh=mD99Rif17/383dZg6K0w7Ewxb7NMda1lQh5PGK/zRZ0=; b=wOmWwKXczvMIE6CfHY1yTi58OTQ2GCmanqTsPaJ1TCNr7X3PYRs+4/WSWYxW+vIALc vYRjfjlskSNrUWqD5mVKrmwXqw6UPOKZkx1UWn6ehE/kye7fNRPs10Jv+FL8m0RgDJvs hdi5WFxPbC/dezC0VMffRR5kt6rD1jYo11Ka1HMuf57WpYj4KYfCLFZZ16ugEbIxdAcQ fwPNXxNVdGgK0/ojLef6k5Zm/nJQkpqHTUzThXFXrSTQcyP7Vs03n1p3V2jL/eNj25Ha XS7C1RMxPJAHx4/QSVhtrQ6BQ9Fc9L7vfsXG3GTuf9dQOpTNqKhnN0tKm3ZMgAR195ea F3aA==; 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-60810-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60810-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru X-Forwarded-Encrypted: i=2; AJvYcCXHGCjJR0U4Dp0FC4abAEM5ObuwLOnIU4rtMc+LqEu5j55g2LNBcaYjdxK8kdlfmOjDJR+w+7zKwy3S5JwChgsFwNJ34g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gf6-20020a056214250600b0067f49d274besi6730146qvb.428.2024.02.11.07.06.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60810-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; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-60810-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60810-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 7605C1C20CE6 for ; Sun, 11 Feb 2024 15:06:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 767205C5F6; Sun, 11 Feb 2024 15:06:00 +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 409D75BAFE; Sun, 11 Feb 2024 15:05:45 +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=1707663958; cv=none; b=pcNGWLbo/l5qCn18GlqA3zFBp6xODZKYgErfuG4sopZZ/mzrIkeCxt/4MEL0a8ASgRIIy8vykHNgHbwV7R14j9UhkQhj7dwizb0UG6U4FksfeNFb3x+DRHvsXhgyZ8wsYXp0QeHWfDh0RoQQUR4RloUUxLt1UZjkVJU3whuO5/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707663958; c=relaxed/simple; bh=L2erQr5VOzvtZwSGbBtPRPaYAXK9HLpbI4kvy9KiY1c=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=CoprA593RD82lJjfCjkuRn3eEoc2pWbInxT5eA7iHfxolgO/ich9SxPoix9je2v25A0h1uFeFelBVXNDWkxZjv35ICYLt5CPr9mEsEy4s/vlw+WD9Ql1ul/YjyfaGrXdS9pjlKIYMQMdPYB5QNb1RdzAZasrT5JcbbCv5EGzQY8= 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 To: Wolfgang Grandegger CC: Daniil Dulov , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Kurt Van Dijck , , , , Subject: [PATCH] can: softing: remove redundant NULL check Date: Sun, 11 Feb 2024 07:05:35 -0800 Message-ID: <20240211150535.3529-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 1790615475852205264 X-GMAIL-MSGID: 1790615475852205264 In this case dev cannot be NULL, so remove redundant check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 03fd3cf5a179 ("can: add driver for Softing card") Signed-off-by: Daniil Dulov Reviewed-by: Simon Horman --- drivers/net/can/softing/softing_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/softing/softing_fw.c b/drivers/net/can/softing/softing_fw.c index bad69a4abec1..5a3f9e4b0b62 100644 --- a/drivers/net/can/softing/softing_fw.c +++ b/drivers/net/can/softing/softing_fw.c @@ -436,7 +436,7 @@ int softing_startstop(struct net_device *dev, int up) return ret; bus_bitmask_start = 0; - if (dev && up) + if (up) /* prepare to start this bus as well */ bus_bitmask_start |= (1 << priv->index); /* bring netdevs down */