driver core: fix smatch warning on dev->bus check
authorRob Herring <robh@kernel.org>
Tue, 11 Oct 2016 18:41:03 +0000 (13:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 15:15:22 +0000 (09:15 -0600)
commitbdacd1b426db83ac8ecf21aef1848120ffe53c07
tree10f8726e0c46e066c0e20961467907e1c9c6c034
parentc5f0627488be996e833038bdba01e45698ddaa26
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>
drivers/base/dd.c