Commit 5e469dac authored by Sudeep Holla's avatar Sudeep Holla
Browse files

firmware: arm_scmi: Ensure drivers provide a probe function

The bus probe callback calls the driver callback without further
checking. Better be safe than sorry and refuse registration of a driver
without a probe function to prevent a NULL pointer exception.

Fixes: 933c5044

 ("firmware: arm_scmi: add scmi protocol bus to enumerate protocol devices")
Reported-by: default avatarUwe Kleine-König <>
Tested-by: default avatarCristian Marussi <>
Reviewed-by: default avatarCristian Marussi <>
Acked-by: default avatarUwe Kleine-König <>
Signed-off-by: default avatarSudeep Holla <>
parent 38e0c992
......@@ -134,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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment