Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: cdns-mhdp8546: Improve error reporting in remove callback

Replace the generic error message issued by the driver core when the remove
callback returns non-zero ("remove callback returned a non-zero value. This
will be ignored.") by a message that tells the actual problem.

Also simplify a bit by checking the return value of wait_event_timeout a
bit later.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-22-u.kleine-koenig@pengutronix.de

authored by

Uwe Kleine-König and committed by
Thomas Zimmermann
be79252e b4791474

+9 -9
+9 -9
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
··· 2600 2600 { 2601 2601 struct cdns_mhdp_device *mhdp = platform_get_drvdata(pdev); 2602 2602 unsigned long timeout = msecs_to_jiffies(100); 2603 - bool stop_fw = false; 2604 2603 int ret; 2605 2604 2606 2605 drm_bridge_remove(&mhdp->bridge); ··· 2607 2608 ret = wait_event_timeout(mhdp->fw_load_wq, 2608 2609 mhdp->hw_state == MHDP_HW_READY, 2609 2610 timeout); 2610 - if (ret == 0) 2611 - dev_err(mhdp->dev, "%s: Timeout waiting for fw loading\n", 2612 - __func__); 2613 - else 2614 - stop_fw = true; 2615 - 2616 2611 spin_lock(&mhdp->start_lock); 2617 2612 mhdp->hw_state = MHDP_HW_STOPPED; 2618 2613 spin_unlock(&mhdp->start_lock); 2619 2614 2620 - if (stop_fw) 2615 + if (ret == 0) { 2616 + dev_err(mhdp->dev, "%s: Timeout waiting for fw loading\n", 2617 + __func__); 2618 + } else { 2621 2619 ret = cdns_mhdp_set_firmware_active(mhdp, false); 2620 + if (ret) 2621 + dev_err(mhdp->dev, "Failed to stop firmware (%pe)\n", 2622 + ERR_PTR(ret)); 2623 + } 2622 2624 2623 2625 phy_exit(mhdp->phy); 2624 2626 ··· 2635 2635 2636 2636 clk_disable_unprepare(mhdp->clk); 2637 2637 2638 - return ret; 2638 + return 0; 2639 2639 } 2640 2640 2641 2641 static const struct of_device_id mhdp_ids[] = {