All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Daniil Dulov <d.dulov@aladdin.ru>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>,
	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
Date: Fri, 16 Feb 2024 17:27:01 +0000	[thread overview]
Message-ID: <20240216172701.GP40273@kernel.org> (raw)
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 <d.dulov@aladdin.ru>

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 <horms@kernel.org>

  reply	other threads:[~2024-02-16 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 15:05 [PATCH] can: softing: remove redundant NULL check Daniil Dulov
2024-02-16 17:27 ` Simon Horman [this message]
2024-02-16 19:47   ` Oliver Hartkopp
2024-02-19 17:00     ` Simon Horman
2024-02-19 20:37       ` Oliver Hartkopp
2024-02-20 13:40         ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240216172701.GP40273@kernel.org \
    --to=horms@kernel.org \
    --cc=d.dulov@aladdin.ru \
    --cc=davem@davemloft.net \
    --cc=dev.kurt@vandijck-laurijssen.be \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.