[PATCH -next] soc: ti: knav_qmss_queue: fix error return code in knav_queue_probe()
From: Wei Yongjun
Date: Tue Apr 28 2020 - 10:56:54 EST
Fix to return negative error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
---
drivers/soc/ti/knav_qmss_queue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 37f3db6c041c..64339c9bb08e 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1864,6 +1864,7 @@ static int knav_queue_probe(struct platform_device *pdev)
regions = of_get_child_by_name(node, "descriptor-regions");
if (!regions) {
dev_err(dev, "descriptor-regions not specified\n");
+ ret = -ENODEV;
goto err;
}
ret = knav_queue_setup_regions(kdev, regions);