From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jiri Pirko <jiri@mellanox.com>
Cc: Ido Schimmel <idosch@mellanox.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch -next] mlxsw: core: remove an unneeded condition
Date: Wed, 9 Dec 2015 13:41:29 +0300 [thread overview]
Message-ID: <20151209104129.GJ3173@mwanda> (raw)
We already know "err" is zero so there is no need to check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
index 4dad146..913106d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
@@ -169,7 +169,7 @@ static ssize_t mlxsw_hwmon_pwm_store(struct device *dev,
dev_err(mlxsw_hwmon->bus_info->dev, "Failed to write PWM\n");
return err;
}
- return err ? err : len;
+ return len;
}
enum mlxsw_hwmon_attr_type {
next reply other threads:[~2015-12-09 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 10:41 Dan Carpenter [this message]
2015-12-09 10:47 ` [patch -next] mlxsw: core: remove an unneeded condition Jiri Pirko
2015-12-12 1:15 ` 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=20151209104129.GJ3173@mwanda \
--to=dan.carpenter@oracle.com \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kernel-janitors@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).