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

Commit d4d8a4c9 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: qcom: cmd-db: report friendly error messages



Fail elegantly by reporting the reason for failure at probe.

Change-Id: I413055fb3db36646d5f602f31a0abfe85870723a
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent 5a580c0a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, 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
@@ -354,6 +354,7 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
	dict = of_iomap(pdev->dev.of_node, 0);
	if (!dict) {
		cmd_db_status = -ENOMEM;
		pr_err("Command DB dictionary addr not found.\n");
		goto failed;
	}

@@ -373,6 +374,7 @@ static int cmd_db_dev_probe(struct platform_device *pdev)

	if (!cmd_db_header) {
		cmd_db_status = -ENOMEM;
		pr_err("Command DB header not found.\n");
		goto failed;
	}