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

Commit 00589461 authored by Casey Piper's avatar Casey Piper
Browse files

msm: mdss: support probe defer in writeback driver



Exit cleanly in the case of failure in writeback driver
to support probe defer scenarios.

Change-Id: I8c8b5099ea649e98b99093cf8b9c3a06d55f8b57
Signed-off-by: default avatarCasey Piper <cpiper@codeaurora.org>
parent 93974768
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -142,12 +142,12 @@ static int mdss_wb_probe(struct platform_device *pdev)

	rc = !mdss_wb_parse_dt(pdev, pdata);
	if (!rc)
		return rc;
		goto error_no_mem;

	rc = mdss_wb_dev_init(wb_ctrl);
	if (rc) {
		dev_err(&pdev->dev, "unable to set up device nodes for writeback panel\n");
		return rc;
		goto error_no_mem;
	}

	pdata->panel_info.type = WRITEBACK_PANEL;
@@ -161,10 +161,16 @@ static int mdss_wb_probe(struct platform_device *pdev)
	rc = mdss_register_panel(pdev, pdata);
	if (rc) {
		dev_err(&pdev->dev, "unable to register writeback panel\n");
		return rc;
		goto error_init;
	}

	return rc;

error_init:
	mdss_wb_dev_uninit(wb_ctrl);
error_no_mem:
	devm_kfree(&pdev->dev, wb_ctrl);
	return rc;
}

static int mdss_wb_remove(struct platform_device *pdev)