summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Nyberg <alexn@dsv.su.se>2005-02-26 13:38:51 +0100
committerGreg KH <gregkh@suse.de>2005-05-04 23:44:37 -0700
commit177a4324944478f2799ce4ede2797cb0f602f274 (patch)
treecc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc /drivers
parent897f5ab2cd733a77a2279268262919caa8154b9d (diff)
downloadkernel-crypto-177a4324944478f2799ce4ede2797cb0f602f274.tar.gz
kernel-crypto-177a4324944478f2799ce4ede2797cb0f602f274.tar.xz
kernel-crypto-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index a7cedd8cefe..268a9c8d168 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) {