Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c1d9547 authored by Axel Lin's avatar Axel Lin Committed by Vinod Koul
Browse files

dmaengine: imx-sdma: return proper error if kzalloc fails

parent 0b052f4a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1281,8 +1281,10 @@ static int __init sdma_probe(struct platform_device *pdev)
		goto err_request_irq;

	sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
	if (!sdma->script_addrs)
	if (!sdma->script_addrs) {
		ret = -ENOMEM;
		goto err_alloc;
	}

	sdma->version = pdata->sdma_version;