Skip to content

Commit cb7a24d

Browse files
committed
misc: rp1-pio: Error out on incompatible firmware
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]>
1 parent 8a08b4a commit cb7a24d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/misc/rp1-pio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,10 @@ static int rp1_pio_probe(struct platform_device *pdev)
12771277
return dev_err_probe(dev, pdev->id, "alias is missing\n");
12781278

12791279
fw = devm_rp1_firmware_get(dev, dev->of_node);
1280-
if (IS_ERR_OR_NULL(fw))
1281-
return dev_err_probe(dev, -ENOENT, "failed to contact RP1 firmware\n");
1280+
if (!fw)
1281+
return dev_err_probe(dev, -EPROBE_DEFER, "failed to find RP1 firmware driver\n");
1282+
if (IS_ERR(fw))
1283+
return dev_err_probe(dev, PTR_ERR(fw), "failed to contact RP1 firmware\n");
12821284
ret = rp1_firmware_get_feature(fw, FOURCC_PIO, &op_base, &op_count);
12831285
if (ret < 0)
12841286
return ret;

0 commit comments

Comments
 (0)