Commit 79fc672a authored by Haoxiang Li's avatar Haoxiang Li Committed by Liviu Dudau
Browse files

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: 5d51f6c0 ("drm/komeda: Add writeback support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarHaoxiang Li <haoxiang_li2024@163.com>
Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20241219090256.146424-1-haoxiang_li2024@163.com


Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
parent fd39c41b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,