mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
897f5ab2cd
commit
177a432494
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue