diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-11 10:06:24 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-11 10:06:24 +0000 |
commit | dd1ff3230292a31d366c96b97711d7df97362093 (patch) | |
tree | 3d93b468066ae1abaa86b702746ba87325cbbaca /src | |
parent | 59f2f4885dbead3f2aece668f48c3ac749f724c2 (diff) |
intel: Protect against a NULL platform device with server fd
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index bd66ae69..87804698 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -263,6 +263,9 @@ static char *get_path(struct xf86_platform_device *dev) #if defined(ODEV_ATTRIB_FD) static int get_fd(struct xf86_platform_device *dev) { + if (dev == NULL) + return -1; + return xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_FD, -1); } |