Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753113AbZFCA5y (ORCPT ); Tue, 2 Jun 2009 20:57:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751276AbZFCA5p (ORCPT ); Tue, 2 Jun 2009 20:57:45 -0400 Received: from netrider.rowland.org ([192.131.102.5]:54257 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751024AbZFCA5p (ORCPT ); Tue, 2 Jun 2009 20:57:45 -0400 Date: Tue, 2 Jun 2009 20:57:46 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: "Rafael J. Wysocki" cc: Frans Pop , , , Linux Kernel Mailing List Subject: Re: [PATCH v2] usb: avoid PM error messages during resume if a device was disconnected In-Reply-To: <200906030053.41385.rjw@sisk.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 33 On Wed, 3 Jun 2009, Rafael J. Wysocki wrote: > > + /* Avoid PM error messages for devices disconnected while suspended > > + * as we'll display regular disconnect messages just a bit later. > > + */ > > + if (status == -ENODEV) > > + return 0; > > + return status; > > + return status == -ENODEV ? 0 : status; > > maybe? > > > } > > > > #endif /* CONFIG_PM */ Personally, I would do: if (status == -ENODEV) status = 0; return status; It doesn't make any difference; they are all equally good. Acked-by: Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/