From: Sergei Shtylyov Date: Sat, 19 Apr 2014 03:21:43 +0000 (+0530) Subject: phy: fix kernel oops in phy_lookup() X-Git-Tag: omap-for-v3.16/pm-signed~48^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=743bb387a1edbf1ebbba6cf77c1af3e488886c39;p=pandora-kernel.git phy: fix kernel oops in phy_lookup() The kernel oopses in phy_lookup() due to 'phy->init_data' being NULL if we register PHYs from a device tree probing driver and then call phy_get() on a device that has no representation in the device tree (e.g. a PCI device). Checking the pointer before dereferening it and skipping an interation if it's NULL prevents this kernel oops. Signed-off-by: Sergei Shtylyov Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed