Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 177a4324 authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Greg Kroah-Hartman
Browse files

[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: default avatarAlexander Nyberg <alexn@dsv.su.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 897f5ab2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {