OSDN Git Service

net: phy: check return code when requesting PHY driver module
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 16 Jan 2019 07:07:38 +0000 (08:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2019 19:56:46 +0000 (11:56 -0800)
commit13d0ab6750b20957ac1466da4e44dc0af746ff28
tree5cb5d00d94ecd897684d817d9ad6a83411201807
parent01cb8a1a6445e3dcb4ea949ad6771890f224b46d
net: phy: check return code when requesting PHY driver module

When requesting the PHY driver module fails we'll bind the genphy
driver later. This isn't obvious to the user and may cause, depending
on the PHY, different types of issues. Therefore check the return code
of request_module(). Note that we only check for failures in loading
the module, not whether a module exists for the respective PHY ID.

v2:
- add comment explaining what is checked and what is not
- return error from phy_device_create() if loading module fails

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c