serdev: only match serdev devices
authorJohan Hovold <johan@kernel.org>
Tue, 9 Jan 2018 16:09:17 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 13:19:10 +0000 (14:19 +0100)
commit7ee69102dbc4eea90f46a24f16961226a477dd4c
treec00b7db06a656fabb01d33b1ea926b1a93554585
parent2460942f51f1f262e77072c9a7c963a1b047a367
serdev: only match serdev devices

Only serdev devices (a.k.a. clients or slaves) are bound to drivers so
bail out early from match() in case the device is not a serdev device
(i.e. if it's a serdev controller).

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c