net: atm: Remove redundant check.
authorGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Fri, 20 Oct 2023 12:21:16 +0000 (12:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2023 07:45:25 +0000 (08:45 +0100)
Checking the 'adev' variable is unnecessary,
because 'cdev' has already been checked earlier.

Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.

Fixes: 656d98b09d57 ("[ATM]: basic sysfs support for ATM devices")
Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/atm/atm_sysfs.c

index 466353b3dde45e9f5418f9a795ef5be88e53a2d9..54e7fb1a4ee5001962b5a5cbd35178a0614e8c84 100644 (file)
@@ -116,8 +116,6 @@ static int atm_uevent(const struct device *cdev, struct kobj_uevent_env *env)
                return -ENODEV;
 
        adev = to_atm_dev(cdev);
-       if (!adev)
-               return -ENODEV;
 
        if (add_uevent_var(env, "NAME=%s%d", adev->type, adev->number))
                return -ENOMEM;