diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-12 01:51:44 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-12 01:51:44 +0100 |
commit | 3ded91041a762423bd49bb932ae2e36b65c6ae4b (patch) | |
tree | bc44c929b80788b34ee3b37d4c991ec54145fc8d /lib/lcm.c | |
parent | 2d30bb0b3889adf09b342722b2ce596c0763bc93 (diff) |
driver core: Avoid NULL pointer dereferences in device_is_bound()
If device_is_bound() is called on a device that's not been registered
yet, it will attepmt to dereference dev->p which is NULL, so avoid
that by checking dev->p in there against NULL.
Fixes: 6b9cb42752da "device core: add device_is_bound()"
Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'lib/lcm.c')
0 files changed, 0 insertions, 0 deletions