From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Slaby Subject: Re: wait_for_completion_interruptible does not wait !! [During PM suspend] Date: Sun, 20 Jun 2010 09:51:31 +0200 Message-ID: <4C1DC883.7090009@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:32833 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752078Ab0FTHvf (ORCPT ); Sun, 20 Jun 2010 03:51:35 -0400 In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Suresh Rajashekara Cc: linux-omap@vger.kernel.org, linux-pm@lists.linux-foundation.org, LKML On 06/20/2010 09:42 AM, Suresh Rajashekara wrote: > On Sun, Jun 20, 2010 at 12:23 AM, Jiri Slaby wrote: >> On 06/20/2010 08:52 AM, Suresh Rajashekara wrote: >>> The ioctl waits on a completion variable (using >>> wait_for_completion_interruptible). >> ... >>> I tried wait_for_completion instead, but now the kernel refuses to suspend. >> >> Do you check return value of wait_for_completion_interruptible and >> return its value if nonzero? >> >> We need the code to comment, otherwise it's hard to say. > > No. I am not checking the return value of the > wait_for_completion_interruptible. I can do it I thought so. Generally, all *_interruptible functions return a value which should be checked and propagated to upper layers. -- js