summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2015-02-26 14:49:51 +0100
committerPaul Walmsley <paul@pwsan.com>2015-06-01 19:22:59 -0600
commit6da233589f26ebd891d507a5a134ab43267006f2 (patch)
treebc0f9782c595d9781baf1d18d8024c11a3532094 /arch/arm/mach-omap2/omap_hwmod.c
parentfabbe6df130a46d5b5e7484b2273d69c4be3012a (diff)
downloadop-kernel-dev-6da233589f26ebd891d507a5a134ab43267006f2.zip
op-kernel-dev-6da233589f26ebd891d507a5a134ab43267006f2.tar.gz
ARM: OMAP2+: Return correct error values from device and hwmod
Without this patch function pm_runtime_get_sync() returns 0 even when some omap subfunction fails. This patch properly propagate error codes from omap functions back to caller. This patch fix problem, when loading omap-aes driver in qemu cause kernel oops. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> [paul@pwsan.com: fix a checkpatch warning] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 752969f..d78c12e 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3318,16 +3318,17 @@ int omap_hwmod_enable(struct omap_hwmod *oh)
*/
int omap_hwmod_idle(struct omap_hwmod *oh)
{
+ int r;
unsigned long flags;
if (!oh)
return -EINVAL;
spin_lock_irqsave(&oh->_lock, flags);
- _idle(oh);
+ r = _idle(oh);
spin_unlock_irqrestore(&oh->_lock, flags);
- return 0;
+ return r;
}
/**
@@ -3340,16 +3341,17 @@ int omap_hwmod_idle(struct omap_hwmod *oh)
*/
int omap_hwmod_shutdown(struct omap_hwmod *oh)
{
+ int r;
unsigned long flags;
if (!oh)
return -EINVAL;
spin_lock_irqsave(&oh->_lock, flags);
- _shutdown(oh);
+ r = _shutdown(oh);
spin_unlock_irqrestore(&oh->_lock, flags);
- return 0;
+ return r;
}
/*
OpenPOWER on IntegriCloud