From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753735AbbBTIWa (ORCPT ); Fri, 20 Feb 2015 03:22:30 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60654 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbbBTIW3 (ORCPT ); Fri, 20 Feb 2015 03:22:29 -0500 Date: Fri, 20 Feb 2015 09:22:26 +0100 From: Pavel Machek To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Tony Lindgren , Russell King , =?iso-8859-1?Q?Beno=EEt?= Cousson , Paul Walmsley , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Aaro Koskinen , Ivaylo Dimitrov , Felipe Balbi , Nishanth Menon Subject: Re: [PATCH] ARM: OMAP2+: Return correct error values from device and hwmod Message-ID: <20150220082226.GB14057@amd> References: <1424389302-24380-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1424389302-24380-1-git-send-email-pali.rohar@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2015-02-20 00:41:41, Pali Rohár wrote: > 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" > Signed-off-by: Pali Rohár Acked-by: Pavel Machek > @@ -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 -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html