lkml.org 
[lkml]   [2024]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] can: softing: remove redundant NULL check
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>

\
 
 \ /
  Last update: 2024-05-27 15:07    [W:6.359 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site