Skip to contentSkip to conversation

soc: ti: knav_qmss_queue: fix error return code in knav_queue_probe()

PATCH New Wei Yongjun 1 participant 1 message Apr 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: ti: knav_qmss_queue: fix error return code in knav_queue_probe()

Fix to return negative error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function.

---
 drivers/soc/ti/knav_qmss_queue.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/ti/knav_qmss_queue.c +1 -0
index 37f3db6c041c..64339c9bb08e 100644
@@ -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);