diff --git a/drivers/staging/fieldbus/anybuss/host.c b/drivers/staging/fieldbus/anybuss/host.c index de6c287efa03..0f730efe9a6d 100644 --- a/drivers/staging/fieldbus/anybuss/host.c +++ b/drivers/staging/fieldbus/anybuss/host.c @@ -1183,8 +1183,6 @@ static int anybus_bus_probe(struct device *dev) struct anybuss_client *adev = to_anybuss_client(dev); - if (!adrv->probe) - return -ENODEV; return adrv->probe(adev); } @@ -1208,6 +1206,9 @@ static struct bus_type anybus_bus = { int anybuss_client_driver_register(struct anybuss_client_driver *drv) { + if (!drv->probe) + return -ENODEV; + drv->driver.bus = &anybus_bus; return driver_register(&drv->driver); }