diff options
author | Rob Herring <robh@kernel.org> | 2016-10-11 13:41:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-31 09:15:22 -0600 |
commit | bdacd1b426db83ac8ecf21aef1848120ffe53c07 (patch) | |
tree | 10f8726e0c46e066c0e20961467907e1c9c6c034 /drivers/base/dd.c | |
parent | c5f0627488be996e833038bdba01e45698ddaa26 (diff) | |
download | linux-bdacd1b426db83ac8ecf21aef1848120ffe53c07.tar.bz2 |
driver core: fix smatch warning on dev->bus check
Commit d42a09802174 (driver core: skip removal test for non-removable
drivers) introduced a smatch warning:
drivers/base/dd.c:386 really_probe()
warn: variable dereferenced before check 'dev->bus' (see line 373)
Fix the warning by removing the dev->bus NULL check. dev->bus will never
be NULL, so the check was unnecessary.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 8937a7ad7165..d76cd97a98b6 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -384,7 +384,7 @@ re_probe: if (test_remove) { test_remove = false; - if (dev->bus && dev->bus->remove) + if (dev->bus->remove) dev->bus->remove(dev); else if (drv->remove) drv->remove(dev); |