summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorAlexander Nyberg <alexn@dsv.su.se>2005-02-26 12:38:51 (GMT)
committerGreg KH <gregkh@suse.de>2005-05-05 06:44:37 (GMT)
commit177a4324944478f2799ce4ede2797cb0f602f274 (patch)
treecc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc /drivers/base
parent897f5ab2cd733a77a2279268262919caa8154b9d (diff)
downloadlinux-177a4324944478f2799ce4ede2797cb0f602f274.tar.xz
[PATCH] Hotplug: Make dev->bus checking consistent
Earlier in the same function dev->bus is checked before dereferenced, make consistent although I honestly don't know if dev->bus could ever be NULL Found by the Coverity tool Signed-off-by: Alexander Nyberg <alexn@dsv.su.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index a7cedd8..268a9c8 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -139,7 +139,7 @@ static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
buffer = &buffer[length];
buffer_size -= length;
- if (dev->bus->hotplug) {
+ if (dev->bus && dev->bus->hotplug) {
/* have the bus specific function add its stuff */
retval = dev->bus->hotplug (dev, envp, num_envp, buffer, buffer_size);
if (retval) {