diff options
author | Alexander Nyberg <alexn@dsv.su.se> | 2005-02-26 07:38:51 -0500 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-05-05 02:44:37 -0400 |
commit | 177a4324944478f2799ce4ede2797cb0f602f274 (patch) | |
tree | cc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc /drivers | |
parent | 897f5ab2cd733a77a2279268262919caa8154b9d (diff) |
[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, | |||
139 | buffer = &buffer[length]; | 139 | buffer = &buffer[length]; |
140 | buffer_size -= length; | 140 | buffer_size -= length; |
141 | 141 | ||
142 | if (dev->bus->hotplug) { | 142 | if (dev->bus && dev->bus->hotplug) { |
143 | /* have the bus specific function add its stuff */ | 143 | /* have the bus specific function add its stuff */ |
144 | retval = dev->bus->hotplug (dev, envp, num_envp, buffer, buffer_size); | 144 | retval = dev->bus->hotplug (dev, envp, num_envp, buffer, buffer_size); |
145 | if (retval) { | 145 | if (retval) { |