drm/komeda: Add check for komeda_get_layer_fourcc_list()
Add check for the return value of komeda_get_layer_fourcc_list()
to catch the potential exception.
Fixes: 5d51f6c0da
("drm/komeda: Add writeback support")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20241219090256.146424-1-haoxiang_li2024@163.com
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
This commit is contained in:
parent
fd39c41bcd
commit
79fc672a09
1 changed files with 4 additions and 0 deletions
|
@ -160,6 +160,10 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
|
|||
formats = komeda_get_layer_fourcc_list(&mdev->fmt_tbl,
|
||||
kwb_conn->wb_layer->layer_type,
|
||||
&n_formats);
|
||||
if (!formats) {
|
||||
kfree(kwb_conn);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = drm_writeback_connector_init(&kms->base, wb_conn,
|
||||
&komeda_wb_connector_funcs,
|
||||
|
|
Loading…
Add table
Reference in a new issue