Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 125d10f0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe()



[ Upstream commit fee5c1e4b789e41719af9fee0e2dd397cd31988f ]

If "sinfo->config" is not found, then return -ENODEV.  Don't
return success.

Fixes: b985172b ("video: atmel_lcdfb: add device tree suport")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent da8b269c
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1062,15 +1062,16 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)

	INIT_LIST_HEAD(&info->modelist);

	if (pdev->dev.of_node) {
		ret = atmel_lcdfb_of_init(sinfo);
		if (ret)
			goto free_info;
	} else {
	if (!pdev->dev.of_node) {
		dev_err(dev, "cannot get default configuration\n");
		goto free_info;
	}

	ret = atmel_lcdfb_of_init(sinfo);
	if (ret)
		goto free_info;

	ret = -ENODEV;
	if (!sinfo->config)
		goto free_info;