diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-09-03 11:02:14 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-09-03 15:02:35 +0100 |
commit | 022be555443eaa3317da6a9a451cf2c9dfcd6ab8 (patch) | |
tree | 6f3f8bd0caf96375d2dd59fda715215a022fa8be /lib | |
parent | 125eee6e981eac0a004aeb4f327439a132ceac5c (diff) |
lib: Check for a specific match if requested.
We only want to allow driver_open to match an unknown driver if asked for
DRIVER_ANY, so we need to double check.
Fixes: 9e5fa9112546 ("lib/drmtest: Move open device to separate function")
Reported-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/drmtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index adff1a81..bfa2e0f0 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -234,7 +234,7 @@ static int open_device(const char *name, unsigned int chipset) break; } } - if (chipset & chip) + if ((chipset & chip) == chip) return fd; err: |