mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
dmaengine: imx-sdma: return proper error if kzalloc fails
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
0b052f4a08
commit
1c1d954753
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user