mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-14 11:19:08 +10:00
Merge branch 'fixed_phy_register-return-value'
Ruan Jinjie says: ==================== net: Fix return value check for fixed_phy_register() The fixed_phy_register() function returns error pointers and never returns NULL. Update the checks accordingly. Changes in v3: - Drop the error fix patch for fixed_phy_get_gpiod(). - Split the error code update code into another patch set as suggested. - Update the commit title and message. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
c727c6f788
@ -1448,7 +1448,7 @@ int bgmac_phy_connect_direct(struct bgmac *bgmac)
|
||||
int err;
|
||||
|
||||
phy_dev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
|
||||
if (!phy_dev || IS_ERR(phy_dev)) {
|
||||
if (IS_ERR(phy_dev)) {
|
||||
dev_err(bgmac->dev, "Failed to register fixed PHY device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
|
||||
};
|
||||
|
||||
phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
|
||||
if (!phydev || IS_ERR(phydev)) {
|
||||
if (IS_ERR(phydev)) {
|
||||
dev_err(kdev, "failed to register fixed PHY device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user