On May 11, 2007, at 5:58 AM, Matvejchikov Ilya wrote:
Signed-off-by: Matvejchikov Ilya <[EMAIL PROTECTED]>
---
diff -purN linux-2.6.21-clean/drivers/net/phy/phy.c
linux-2.6.21/drivers/net/phy/phy.c
--- linux-2.6.21-clean/drivers/net/phy/phy.c 2007-04-26
07:08:32.000000000 +0400
+++ linux-2.6.21/drivers/net/phy/phy.c 2007-05-04
08:22:01.000000000 +0400
@@ -245,6 +245,9 @@ EXPORT_SYMBOL(phy_sanitize_settings);
*/
int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd
*cmd)
{
+ if (unlikely(!phydev))
+ return -EINVAL;
Should this be -ENODEV?
+
if (cmd->phy_address != phydev->addr)
return -EINVAL;
@@ -289,6 +292,9 @@ EXPORT_SYMBOL(phy_ethtool_sset);
int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd
*cmd)
{
+ if (unlikely(!phydev))
+ return -EINVAL;
same question.
+
cmd->supported = phydev->supported;
cmd->advertising = phydev->advertising;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html