lkml.org 
[lkml]   [2015]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next v1 01/18] net: ethtool: propagate get_settings error
From
Date
On Mon, 2015-01-26 at 17:35 -0800, David Decotigny wrote:
> From: David Decotigny <decot@googlers.com>
>
> Signed-off-by: David Decotigny <decot@googlers.com>
> ---
> net/core/ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> index 91f74f3..52efb7e 100644
> --- a/net/core/ethtool.c
> +++ b/net/core/ethtool.c
> @@ -364,7 +364,7 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr)
>
> if (copy_to_user(useraddr, &cmd, sizeof(cmd)))
> return -EFAULT;
> - return 0;
> + return err;

err cannnot be negative at this point (and if it's positive, that's a
bug in the get_settings implementation which we happen to fix up).

Ben.

> }
>
> static int ethtool_set_settings(struct net_device *dev, void __user *useraddr)

--
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-01-28 21:41    [W:0.110 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site