From 75455dfc54ef642fd2c26d8ac554e301407add58 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Thu, 14 May 2020 17:18:42 -0700 Subject: [PATCH] soc: qcom: mem-buf: Fix message queue registration check The condition that determines if we print an error after failing to register for the mem-buf message queue checks the return code against EPROBE_DEFER. This is not correct, as error codes are negative, so fix the check. Change-Id: I4ed03bde56c6edf66e0ffed060ec23a87a46be54 Signed-off-by: Isaac J. Manjarres --- drivers/soc/qcom/mem-buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/mem-buf.c b/drivers/soc/qcom/mem-buf.c index 4a4af066ea90..ad34a20e2ccc 100644 --- a/drivers/soc/qcom/mem-buf.c +++ b/drivers/soc/qcom/mem-buf.c @@ -1596,7 +1596,7 @@ static int mem_buf_probe(struct platform_device *pdev) mem_buf_hh_msgq_hdl = hh_msgq_register(HH_MSGQ_LABEL_MEMBUF); if (IS_ERR(mem_buf_hh_msgq_hdl)) { ret = PTR_ERR(mem_buf_hh_msgq_hdl); - if (ret != EPROBE_DEFER) + if (ret != -EPROBE_DEFER) dev_err(dev, "Message queue registration failed: rc: %d\n", ret);