ARM: OMAP2+: Return correct error values from device and hwmod
[deliverable/linux.git] / arch / arm / mach-omap2 / omap_hwmod.c
index 752969ff9de04f95ef8b9a695325901b6297cf78..d78c12e7cb5e1ace5f79a9d28f45321e809dea24 100644 (file)
@@ -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;
 }
 
 /*
This page took 0.029672 seconds and 5 git commands to generate.