All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-next-2.6] bonding: fix return value of couple of store functions
Date: Tue, 25 Jan 2011 13:07:06 -0800	[thread overview]
Message-ID: <304.1295989626@death> (raw)
In-Reply-To: <20110125210324.GD2932@psychotron.redhat.com>

Jiri Pirko <jpirko@redhat.com> wrote:

>count is incorrectly returned even in case of fail. Return ret instead.
>
>Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>


>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index 8fd0174..72bb0f6 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d,
> 			bond->dev->name, new_value);
> 	}
> out:
>-	return count;
>+	return ret;
> }
> static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
> 		   bonding_show_carrier, bonding_store_carrier);
>@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
> 		}
> 	}
> out:
>-	return count;
>+	return ret;
> }
> static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
> 		   bonding_show_slaves_active, bonding_store_slaves_active);

  reply	other threads:[~2011-01-25 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 18:53 [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active() Jiri Pirko
2011-01-25 19:22 ` Jay Vosburgh
2011-01-25 20:52   ` Jiri Pirko
2011-01-25 21:03   ` [PATCH net-next-2.6] bonding: fix return value of couple of store functions Jiri Pirko
2011-01-25 21:07     ` Jay Vosburgh [this message]
2011-01-25 21:13       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=304.1295989626@death \
    --to=fubar@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.