Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1246902rdb; Fri, 16 Feb 2024 09:27:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXvLlLMH2qgOVayAARcL5WeqGsI1Y2PxLb9XZJme6AdaWJWGsTyy2n+2F7GFznuXNd7zAtxz6dEw2T1XrYdtsqSfdjeLY2VKDEH/zJlEg== X-Google-Smtp-Source: AGHT+IGoPX2hDAKBW0a6z7QAnUp68i83IFek71b55dVjtIBBTDujTFynWN8Cb2Yk5ss9SqEK7sEq X-Received: by 2002:a17:902:ce83:b0:1d9:c876:b825 with SMTP id f3-20020a170902ce8300b001d9c876b825mr6997687plg.56.1708104436925; Fri, 16 Feb 2024 09:27:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708104436; cv=pass; d=google.com; s=arc-20160816; b=A+Q3Qdn9fN61ycbonU9n31wfta1rXZ5tM4PWzWkFVEzB6xDP9u3JiuLiOcPoo8nUIi JaMhMSnttbOhnOPGCDbv+GWColJ1oLaTUZAlGk99xfx/EdJlFCcz/rW2bY7FeHGjjoLf hdwoUa6zuF2wHnIkFrIaU+P6Uavi0ZAS0m9wtBaAdJSPrjtxVUzFIh9H8r/gnwT1KC2z ZameeRfyvtKzpq15JDGZPv7ra/CG+DHlRJGhhB8CP6qQ02E9lVXY1y5bgESwCDXS5uPU nxE/PHemDgX7Gu8T3NmZylgpRnNTWZdUHH5jGQC/P7uiroTNlgD0bjTWHo68DvNr0s7Z oxfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pS4BcqCktEmG6Rtn+6FB1WvINBCAThdcpHuhuHKziNc=; fh=O5d4ukC6p3Q28PQoIZwUePQq3TgkU14QgLR6c3gA97s=; b=ywbMyr1dHX0YU9GJy62nwEmd8VpDeahnPUSUUYf1WPgSpOltBEQ6+RY3d4K/oWfWZ4 Upg7vJAEEMstu3sM9aJCuei1t5BGGs+ROgLziYaosOrd4wjwZOrrY2vsrhqx5sPw2Kct C/nsxWF149TfsGrsOWkxztSOGAaaNVEIPIbRv4+cA7UTreKMEjD5tRTb3ZbAFfBYNZMO MbEGOcfkmqQc+uqSvu19aCJMXrNBkbk3yPzehLdLE+PK0MuyvFhRm8ynUQe8oB9es2Te DNMbbgAth/wdEtjL9qWmVc60xnq2Le4EWK2pHEk7H5yCg6IFU+fFj6UzG6EsEvAeFLVN tGjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KNVUIXhX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69070-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e11-20020a170902cf4b00b001db9fb80947si153892plg.539.2024.02.16.09.27.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69070-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KNVUIXhX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69070-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9FC13285A06 for ; Fri, 16 Feb 2024 17:27:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC515132483; Fri, 16 Feb 2024 17:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KNVUIXhX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 044D8130E3D; Fri, 16 Feb 2024 17:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104426; cv=none; b=NRVlUFxkpRG/DkxW5BNZBy2QTVE6+4xXlbq2f8qDH3JgnJ4yYRJItR9UMpwo/iDEI572pub2woEiIc+95LByf9Ec3xLD6EUusHdskOveaqkXx2HYbli5A5qoDoVeSl8wQI4LdkmJ2fE1iOuOy9onfIvrixji5O7H/4hw/blJDfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104426; c=relaxed/simple; bh=pHPAK4RE3qzV+K9xTITuogvkre5ptmDnK4AELxLbjxE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o8TbjdH0gsjidNgiLqfvsyHV3NY8Oq9PqK4Tvsuv7CCk2rp+ZIq9wIYYuG6aCwflu6mqoO5wIJsynqRqIyJOfln8Wl6oq+QUQ1Ss/qskccMnjLNjxLDKXkdwX4Wn2Bss34F4ZKbcrgxpfhffqrKBGm16Yp2n2cPbchCVymJmApk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KNVUIXhX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76842C433F1; Fri, 16 Feb 2024 17:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708104425; bh=pHPAK4RE3qzV+K9xTITuogvkre5ptmDnK4AELxLbjxE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KNVUIXhXfbTTqBhYV7fjO8zz4ayYXh+g/C15M6zTl9Qrpu9/68IHlAPhT8Cy8nQqV fVbPWGw2TYbnJVdsdNV3XYnwf7uSjlkq/yt21ZB0dPSF5vpWFEcSnmvxeHhg8FwAQY RGCiOzeH630lBgsPUAnfjsz+RtTti1qG6hKOOy75wwoplS+HjF+P3CKF1jlMAFTRWi yV4qkQpgvd8NaH4vI3XMCHbcfn6wmxIqQKZtIgfiAZ8aPwNn2QfSNhD1c09WO/Ob5w a0bwVWhIUHVCyONAOCUH5D2R6PbSeesjL2c939BmBYtoeRMGZ1zWrEA/vSK2+rogvW 8/X5S5lZIlxSQ== Date: Fri, 16 Feb 2024 17:27:01 +0000 From: Simon Horman To: Daniil Dulov Cc: Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Kurt Van Dijck , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] can: softing: remove redundant NULL check Message-ID: <20240216172701.GP40273@kernel.org> References: <20240211150535.3529-1-d.dulov@aladdin.ru> 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-Disposition: inline In-Reply-To: <20240211150535.3529-1-d.dulov@aladdin.ru> On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote: > 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 Hi Daniil, I am not sure that dev cannot be NULL. But I do see that the code assumes it is not, and would crash if it is. So I think that, functionally, your statement is correct. priv = netdev_priv(dev); card = priv->card; Reviewed-by: Simon Horman