mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/bridge: synopsys: dw-dp: Support unregistering the AUX channel
The DisplayPort AUX channel gets initialized and registered during
dw_dp_bind(), but it is never unregistered, which may lead to resource
leaks and/or use-after-free.
Add the missing dw_dp_unbind() function to allow the users of the
library to handle the required cleanup, i.e. unregister the AUX adapter.
Fixes: 86eecc3a9c ("drm/bridge: synopsys: Add DW DPTX Controller support library")
Reviewed-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260601-drm-rk-fixes-v4-1-c3f3f123e1da@collabora.com
This commit is contained in:
parent
28e670a088
commit
ed04e8e230
|
|
@ -2093,6 +2093,12 @@ struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encoder *encoder,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(dw_dp_bind);
|
||||
|
||||
void dw_dp_unbind(struct dw_dp *dp)
|
||||
{
|
||||
drm_dp_aux_unregister(&dp->aux);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_dp_unbind);
|
||||
|
||||
MODULE_AUTHOR("Andy Yan <andyshrk@163.com>");
|
||||
MODULE_DESCRIPTION("DW DP Core Library");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
|||
|
|
@ -24,4 +24,5 @@ struct dw_dp_plat_data {
|
|||
|
||||
struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encoder *encoder,
|
||||
const struct dw_dp_plat_data *plat_data);
|
||||
void dw_dp_unbind(struct dw_dp *dp);
|
||||
#endif /* __DW_DP__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user