mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: <balbi@ti.com>, <kishon@ti.com>
Cc: <linux-kernel@vger.kernel.org>, <gregkh@linuxfoundation.org>,
	<s.nawrocki@samsung.com>, <jg1.han@samsung.com>,
	<mporter@linaro.org>, <andrew@lunn.ch>, <k.debski@samsung.com>,
	<gautamvivek1987@gmail.com>, <heikki.krogerus@linux.intel.com>,
	<yuvaraj.cd@gmail.com>
Subject: [PATCH 2/2] phy: phy-core.c: remove unnecessary initialization of local variables
Date: Thu, 19 Dec 2013 20:01:44 +0530	[thread overview]
Message-ID: <1387463504-4415-2-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1387463504-4415-1-git-send-email-kishon@ti.com>

There were a few places where variables are initialized unncessarily.
Remove those initializations.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index e198259..8d9ef25 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -198,7 +198,7 @@ EXPORT_SYMBOL_GPL(phy_exit);
 
 int phy_power_on(struct phy *phy)
 {
-	int ret = -ENOTSUPP;
+	int ret;
 
 	ret = phy_pm_runtime_get_sync(phy);
 	if (ret < 0 && ret != -ENOTSUPP)
@@ -226,7 +226,7 @@ EXPORT_SYMBOL_GPL(phy_power_on);
 
 int phy_power_off(struct phy *phy)
 {
-	int ret = -ENOTSUPP;
+	int ret;
 
 	mutex_lock(&phy->mutex);
 	if (phy->power_count == 1 && phy->ops->power_off) {
@@ -369,7 +369,7 @@ EXPORT_SYMBOL_GPL(of_phy_simple_xlate);
 struct phy *phy_get(struct device *dev, const char *string)
 {
 	int index = 0;
-	struct phy *phy = NULL;
+	struct phy *phy;
 
 	if (string == NULL) {
 		dev_WARN(dev, "missing string\n");
-- 
1.7.10.4


  reply	other threads:[~2013-12-19 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 14:31 [PATCH 1/2] phy: phy-core: increment refcounting variables only on 'success' Kishon Vijay Abraham I
2013-12-19 14:31 ` Kishon Vijay Abraham I [this message]
2013-12-20  5:06 ` [PATCH v2 " Kishon Vijay Abraham I

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=1387463504-4415-2-git-send-email-kishon@ti.com \
    --to=kishon@ti.com \
    --cc=andrew@lunn.ch \
    --cc=balbi@ti.com \
    --cc=gautamvivek1987@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jg1.han@samsung.com \
    --cc=k.debski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=yuvaraj.cd@gmail.com \
    /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

all inboxes | Powered by JetHome®