msm: pil: Print error messages when pil_force_{boot,shutdown} fails
If a peripheral is not registered and a driver calls
pil_force_{boot,shutdown}() the function silently returns an
error value or void. Print an error message so that log analysis
can find these problems more easily.
Change-Id: I6b535c2e7ac548b502941f37306f61890ef9b569
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/peripheral-loader.c b/arch/arm/mach-msm/peripheral-loader.c
index 1539487..6f7f771 100644
--- a/arch/arm/mach-msm/peripheral-loader.c
+++ b/arch/arm/mach-msm/peripheral-loader.c
@@ -374,8 +374,10 @@
struct pil_device *pil;
pil = find_peripheral(name);
- if (!pil)
+ if (!pil) {
+ pr_err("%s: Couldn't find %s\n", __func__, name);
return;
+ }
mutex_lock(&pil->lock);
if (!WARN(!pil->count, "%s: Reference count mismatch\n", __func__))
@@ -393,8 +395,10 @@
struct pil_device *pil;
pil = find_peripheral(name);
- if (!pil)
+ if (!pil) {
+ pr_err("%s: Couldn't find %s\n", __func__, name);
return -EINVAL;
+ }
mutex_lock(&pil->lock);
if (!WARN(!pil->count, "%s: Reference count mismatch\n", __func__))