]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe
authorZhihao Cheng <chengzhihao1@huawei.com>
Sun, 22 Nov 2020 03:22:38 +0000 (19:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:42:36 +0000 (13:42 +0100)
[ Upstream commit 4cba398f37f868f515ff12868418dc28574853a1 ]

Fix to return the error code from of_get_child_by_name() instaed of 0
in knav_queue_probe().

Fixes: 41f93af900a20d1a0a ("soc: ti: add Keystone Navigator QMSS driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/ti/knav_qmss_queue.c

index 3a3bc8ef532a79dda8d8b79975232da8a1c1cbad..1aff6659655e399c3aeaf23a9857237325b1b0c1 100644 (file)
@@ -1785,9 +1785,10 @@ static int knav_queue_probe(struct platform_device *pdev)
        if (ret)
                goto err;
 
-       regions =  of_get_child_by_name(node, "descriptor-regions");
+       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);