mirror of https://gitee.com/openkylin/linux.git
crypto: mxs-dcp - Fix platform_get_irq() error handling
We should test the error case for each platform_get_irq() assignment and propagate the error accordingly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
b3bd5869fd
commit
d9588f8744
|
@ -908,9 +908,14 @@ static int mxs_dcp_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
dcp_vmi_irq = platform_get_irq(pdev, 0);
|
dcp_vmi_irq = platform_get_irq(pdev, 0);
|
||||||
|
if (dcp_vmi_irq < 0) {
|
||||||
|
ret = dcp_vmi_irq;
|
||||||
|
goto err_mutex;
|
||||||
|
}
|
||||||
|
|
||||||
dcp_irq = platform_get_irq(pdev, 1);
|
dcp_irq = platform_get_irq(pdev, 1);
|
||||||
if (dcp_vmi_irq < 0 || dcp_irq < 0) {
|
if (dcp_irq < 0) {
|
||||||
ret = -EINVAL;
|
ret = dcp_irq;
|
||||||
goto err_mutex;
|
goto err_mutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue