Commit 9cb8bae3 authored by David S. Miller's avatar David S. Miller

Merge branch 'phy-micrel-warnings'

Divya Koppera says:

====================
Fixed warnings

Fixed warnings related to PTR_ERR and initialization.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f23395b4 3f88d7d1
......@@ -2088,7 +2088,8 @@ static int ksz886x_cable_test_get_status(struct phy_device *phydev,
const struct kszphy_type *type = phydev->drv->driver_data;
unsigned long pair_mask = type->pair_mask;
int retries = 20;
int pair, ret;
int ret = 0;
int pair;
*finished = false;
......@@ -3007,10 +3008,6 @@ static int lan8814_ptp_probe_once(struct phy_device *phydev)
{
struct lan8814_shared_priv *shared = phydev->shared->priv;
if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) ||
!IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING))
return 0;
/* Initialise shared lock for clock*/
mutex_init(&shared->shared_lock);
......@@ -3030,12 +3027,16 @@ static int lan8814_ptp_probe_once(struct phy_device *phydev)
shared->ptp_clock = ptp_clock_register(&shared->ptp_clock_info,
&phydev->mdio.dev);
if (IS_ERR_OR_NULL(shared->ptp_clock)) {
if (IS_ERR(shared->ptp_clock)) {
phydev_err(phydev, "ptp_clock_register failed %lu\n",
PTR_ERR(shared->ptp_clock));
return -EINVAL;
}
/* Check if PHC support is missing at the configuration level */
if (!shared->ptp_clock)
return 0;
phydev_dbg(phydev, "successfully registered ptp clock\n");
shared->phydev = phydev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment