Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5247aecf authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman
Browse files

driver core: fix driver_match_device



This patch fixes a bug introduced in commit
49b420a1.

If a instance of bus_type doesn't have  .match method,
all .probe of drivers in the bus should be called, or else
the .probe have not a chance to be called.

Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Reported-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d110271e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ extern int driver_probe_device(struct device_driver *drv, struct device *dev);
static inline int driver_match_device(struct device_driver *drv,
				      struct device *dev)
{
	return drv->bus->match && drv->bus->match(dev, drv);
	return drv->bus->match ? drv->bus->match(dev, drv) : 1;
}

extern void sysdev_shutdown(void);