Commit 05d06f37 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jassi Brar
Browse files

mailbox: imx: Fix an IS_ERR() vs NULL bug



The devm_kzalloc() function does not return error pointers, it returns
NULL on failure.

Fixes: 97961f78 ("mailbox: imx: support i.MX8ULP S4 MU")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 79daec8b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -563,8 +563,8 @@ static int imx_mu_probe(struct platform_device *pdev)
		size = sizeof(struct imx_sc_rpc_msg_max);

	priv->msg = devm_kzalloc(dev, size, GFP_KERNEL);
	if (IS_ERR(priv->msg))
		return PTR_ERR(priv->msg);
	if (!priv->msg)
		return -ENOMEM;

	priv->clk = devm_clk_get(dev, NULL);
	if (IS_ERR(priv->clk)) {