diff options
author | Alexander Nyberg <alexn@dsv.su.se> | 2005-02-26 13:38:51 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-05-05 08:44:37 +0200 |
commit | 177a4324944478f2799ce4ede2797cb0f602f274 (patch) | |
tree | cc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc /drivers | |
parent | Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/lin... (diff) | |
download | linux-177a4324944478f2799ce4ede2797cb0f602f274.tar.xz linux-177a4324944478f2799ce4ede2797cb0f602f274.zip |
[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')
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index a7cedd8cefe5..268a9c8d168b 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) { |