Thread (3 messages) 3 messages, 2 authors, 2015-02-20

[PATCH] ARM: OMAP2+: Return correct error values from device and hwmod

From: Pali Rohár <hidden>
Date: 2015-02-20 09:50:11
Also in: linux-omap, lkml

On Friday 20 February 2015 09:22:26 Pavel Machek wrote:
On Fri 2015-02-20 00:41:41, Pali Roh?r wrote:
quoted
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.
"fixes"
quoted
Signed-off-by: Pali Roh?r <redacted>
Acked-by: Pavel Machek <redacted>
quoted
@@ -3350,16 +3350,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;

 }
Normally, such variable is called ret or res...

									Pavel
In other parts of this code is used name "r" not "ret".

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150220/66029e73/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help