Skip to content

Commit

Permalink
net: atm: Remove redundant check.
Browse files Browse the repository at this point in the history
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: 656d98b ("[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>
  • Loading branch information
Gavrilov Ilia authored and David S. Miller committed Oct 23, 2023
1 parent 5e37040 commit 92fc97a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/atm/atm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 92fc97a

Please sign in to comment.