Merge v5.14-rc3 into usb-next
[linux-2.6-microblaze.git] / drivers / firmware / arm_scmi / bus.c
index 784cf00..6c7e249 100644 (file)
@@ -104,11 +104,6 @@ static int scmi_dev_probe(struct device *dev)
 {
        struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
        struct scmi_device *scmi_dev = to_scmi_dev(dev);
-       const struct scmi_device_id *id;
-
-       id = scmi_dev_match_id(scmi_dev, scmi_drv);
-       if (!id)
-               return -ENODEV;
 
        if (!scmi_dev->handle)
                return -EPROBE_DEFER;
@@ -139,6 +134,9 @@ int scmi_driver_register(struct scmi_driver *driver, struct module *owner,
 {
        int retval;
 
+       if (!driver->probe)
+               return -EINVAL;
+
        retval = scmi_protocol_device_request(driver->id_table);
        if (retval)
                return retval;