[PATCH] phylib: Fix oops in suspend/resume paths

David Miller davem at davemloft.net
Fri Jan 23 08:51:54 EST 2009


From: Anton Vorontsov <avorontsov at ru.mvista.com>
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 <avorontsov at ru.mvista.com>

Applied, thanks Anton.



More information about the Linuxppc-dev mailing list