Commit 569ed6a
drm/bridge: synopsys: dw-dp: fix error paths of dw_dp_bind
commit 1a0f69e upstream.
Fix several issues in dw_dp_bind() error handling:
1. Missing return after drm_bridge_attach() failure - the function
continued execution instead of returning an error.
2. Resource leak: drm_dp_aux_register() is not a devm function, so
drm_dp_aux_unregister() must be called on all error paths after
aux registration succeeds. This affects errors from:
- drm_bridge_attach()
- phy_init()
- devm_add_action_or_reset()
- platform_get_irq()
- devm_request_threaded_irq()
3. Bug fix: platform_get_irq() returns the IRQ number or a negative
error code, but the error path was returning ERR_PTR(ret) instead
of ERR_PTR(dp->irq).
Use a goto label for cleanup to ensure consistent error handling.
Fixes: 86eecc3 ("drm/bridge: synopsys: Add DW DPTX Controller support library")
Cc: stable@vger.kernel.org
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260102155553.13243-1-osama.abdelkader@gmail.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent ce2cca8 commit 569ed6a
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2060 | 2060 | | |
2061 | 2061 | | |
2062 | 2062 | | |
2063 | | - | |
| 2063 | + | |
2064 | 2064 | | |
| 2065 | + | |
| 2066 | + | |
2065 | 2067 | | |
2066 | 2068 | | |
2067 | 2069 | | |
2068 | 2070 | | |
2069 | 2071 | | |
2070 | 2072 | | |
2071 | | - | |
| 2073 | + | |
2072 | 2074 | | |
2073 | 2075 | | |
2074 | 2076 | | |
2075 | 2077 | | |
2076 | | - | |
| 2078 | + | |
2077 | 2079 | | |
2078 | 2080 | | |
2079 | | - | |
2080 | | - | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
2081 | 2085 | | |
2082 | 2086 | | |
2083 | 2087 | | |
2084 | 2088 | | |
2085 | 2089 | | |
2086 | | - | |
| 2090 | + | |
2087 | 2091 | | |
2088 | 2092 | | |
2089 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
2090 | 2098 | | |
2091 | 2099 | | |
2092 | 2100 | | |
| |||
0 commit comments