Messages in this thread Patch in this message |  | | | Subject | [PATCH] Hotplug: Make dev->bus checking consistent | | Date | Wed, 4 May 2005 23:57:01 -0700 | | From | Greg KH <> |
[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>
--- commit 177a4324944478f2799ce4ede2797cb0f602f274 tree cc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc parent 897f5ab2cd733a77a2279268262919caa8154b9d author Alexander Nyberg <alexn@dsv.su.se> 1109421531 +0100 committer Greg KH <gregkh@suse.de> 1115275477 -0700 Index: drivers/base/core.c =================================================================== --- 95866d31faa6db4ec786399296238344c7cfea0c/drivers/base/core.c (mode:100644 sha1:a7cedd8cefe5385a8d2eb6f334c8661454c443d7) +++ cc42dcdbce1c3b53ea147abd3ebf784f0d2bf1bc/drivers/base/core.c (mode:100644 sha1:268a9c8d168b6ac72a46e0c624830b030b79df51) @@ -139,7 +139,7 @@ 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) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |