Phy: Check NULL bus case and undetected phy via of
From 5e87dc2 Mon Sep 17 00:00:00 2001
From: Clement Leger <clement.leger@kalray.eu>
Date: Tue, 5 Sep 2017 10:37:23 +0200
Subject: [PATCH] Phy: Check NULL bus case and undetected phy via of

phy_device_connect can be called with NULL miibus for automatic match
with the phy described in the device tree. In the case where the phy
was not detected for some unknown reason, the next calls will be done
with a NULL bus. This will lead to undefined behavior and more probably
crashes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c453178 commit 57c9a40d8e3a437dbbaa8e463008eaf22214e5c8
@Clément Leger Clément Leger authored on 5 Sep 2017
Sascha Hauer committed on 6 Sep 2017
Showing 1 changed file
View
drivers/net/phy/phy.c