From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sunset.davemloft.net (unknown [74.93.104.97]) by ozlabs.org (Postfix) with ESMTP id 319D6DDF1F for ; Fri, 23 Jan 2009 08:51:54 +1100 (EST) Date: Thu, 22 Jan 2009 13:51:54 -0800 (PST) Message-Id: <20090122.135154.96272626.davem@davemloft.net> To: avorontsov@ru.mvista.com Subject: Re: [PATCH] phylib: Fix oops in suspend/resume paths From: David Miller In-Reply-To: <20090122180930.GA27624@oksana.dev.rtsoft.ru> References: <20090122180930.GA27624@oksana.dev.rtsoft.ru> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org, afleming@freescale.com, jgarzik@pobox.com, netdev@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Anton Vorontsov Date: Thu, 22 Jan 2009 21:09:30 +0300 > Suspend/resume routines check for phydrv != NULL, but that is > wrong because "phydrv" comes from container_of(drv). If drv is NULL, > then container_of(drv) will return non-NULL result, and the checks > won't work. > > The Freescale TBI PHYs are driver-less, so "drv" is NULL, and that > leads to the following oops: ... > This patch fixes the issue, plus removes unneeded parentheses > and fixes indentation level in mdio_bus_suspend(). > > Signed-off-by: Anton Vorontsov Applied, thanks Anton.