ASoC: rockchip: multicodecs: Fix potential NULL point reference
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: I43399292c8f242e98139cb8e285f5bc732889894
This commit is contained in:
parent
b4652bb42b
commit
6026cf7136
|
|
@ -657,6 +657,9 @@ static int rk_multicodecs_probe(struct platform_device *pdev)
|
|||
|
||||
codecs = devm_kcalloc(&pdev->dev, idx,
|
||||
sizeof(*codecs), GFP_KERNEL);
|
||||
if (!codecs)
|
||||
return -ENOMEM;
|
||||
|
||||
link->codecs = codecs;
|
||||
link->num_codecs = idx;
|
||||
idx = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue