Skip to content

Commit

Permalink
misc: rp1-pio: Error out on incompatible firmware
Browse files Browse the repository at this point in the history
If the RP1 firmware has reported an error then return that from the PIO
probe function, otherwise defer the probing.

Link: #6642

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
pelwell committed Feb 3, 2025
1 parent 8a08b4a commit cb7a24d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/misc/rp1-pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,8 +1277,10 @@ static int rp1_pio_probe(struct platform_device *pdev)
return dev_err_probe(dev, pdev->id, "alias is missing\n");

fw = devm_rp1_firmware_get(dev, dev->of_node);
if (IS_ERR_OR_NULL(fw))
return dev_err_probe(dev, -ENOENT, "failed to contact RP1 firmware\n");
if (!fw)
return dev_err_probe(dev, -EPROBE_DEFER, "failed to find RP1 firmware driver\n");
if (IS_ERR(fw))
return dev_err_probe(dev, PTR_ERR(fw), "failed to contact RP1 firmware\n");
ret = rp1_firmware_get_feature(fw, FOURCC_PIO, &op_base, &op_count);
if (ret < 0)
return ret;
Expand Down

0 comments on commit cb7a24d

Please sign in to comment.