Skip to content

Commit

Permalink
firmware: arm_scmi: Simplify device probe function on the bus
Browse files Browse the repository at this point in the history
When the driver core calls the probe callback it already checked that
the devices match, so there is no need to call the match callback again.

Link: https://lore.kernel.org/r/20210624095059.4010157-1-sudeep.holla@arm.com
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
  • Loading branch information
Sudeep Holla committed Jul 12, 2021
1 parent e73f0f0 commit 38e0c99
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/firmware/arm_scmi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 38e0c99

Please sign in to comment.