mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ASoC: rockchip: hdmi: Fix potential NULL point reference
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: I9d0c2adbdffc268d88bac31c1db31507fd82661d
This commit is contained in:
@@ -227,6 +227,9 @@ static int rk_hdmi_probe(struct platform_device *pdev)
|
||||
|
||||
codecs = devm_kcalloc(&pdev->dev, idx,
|
||||
sizeof(*codecs), GFP_KERNEL);
|
||||
if (!codecs)
|
||||
return -ENOMEM;
|
||||
|
||||
rk_data->dai.codecs = codecs;
|
||||
rk_data->dai.num_codecs = idx;
|
||||
idx = 0;
|
||||
|
||||
Reference in New Issue
Block a user