lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1407308765-13869-1-git-send-email-kiran.padwal@smartplayin.com>
Date:	Wed,  6 Aug 2014 12:36:05 +0530
From:	Kiran Padwal <kiran.padwal@...rtplayin.com>
To:	wsa@...-dreams.de
Cc:	kiran.padwal@...rtplayin.com, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] i2c: remove unnecessary 'else' after 'return' statement

Fix the following warning reported by checkpatch.pl:

WARNING: else is not generally useful after a break or return

Signed-off-by: Kiran Padwal <kiran.padwal@...rtplayin.com>
---
 drivers/i2c/i2c-core.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 632057a..228bd04 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -351,8 +351,8 @@ static int i2c_device_pm_suspend(struct device *dev)
 
 	if (pm)
 		return pm_generic_suspend(dev);
-	else
-		return i2c_legacy_suspend(dev, PMSG_SUSPEND);
+
+	return i2c_legacy_suspend(dev, PMSG_SUSPEND);
 }
 
 static int i2c_device_pm_resume(struct device *dev)
@@ -361,8 +361,8 @@ static int i2c_device_pm_resume(struct device *dev)
 
 	if (pm)
 		return pm_generic_resume(dev);
-	else
-		return i2c_legacy_resume(dev);
+
+	return i2c_legacy_resume(dev);
 }
 
 static int i2c_device_pm_freeze(struct device *dev)
@@ -371,8 +371,8 @@ static int i2c_device_pm_freeze(struct device *dev)
 
 	if (pm)
 		return pm_generic_freeze(dev);
-	else
-		return i2c_legacy_suspend(dev, PMSG_FREEZE);
+
+	return i2c_legacy_suspend(dev, PMSG_FREEZE);
 }
 
 static int i2c_device_pm_thaw(struct device *dev)
@@ -381,8 +381,8 @@ static int i2c_device_pm_thaw(struct device *dev)
 
 	if (pm)
 		return pm_generic_thaw(dev);
-	else
-		return i2c_legacy_resume(dev);
+
+	return i2c_legacy_resume(dev);
 }
 
 static int i2c_device_pm_poweroff(struct device *dev)
@@ -391,8 +391,8 @@ static int i2c_device_pm_poweroff(struct device *dev)
 
 	if (pm)
 		return pm_generic_poweroff(dev);
-	else
-		return i2c_legacy_suspend(dev, PMSG_HIBERNATE);
+
+	return i2c_legacy_suspend(dev, PMSG_HIBERNATE);
 }
 
 static int i2c_device_pm_restore(struct device *dev)
@@ -401,8 +401,8 @@ static int i2c_device_pm_restore(struct device *dev)
 
 	if (pm)
 		return pm_generic_restore(dev);
-	else
-		return i2c_legacy_resume(dev);
+
+	return i2c_legacy_resume(dev);
 }
 #else /* !CONFIG_PM_SLEEP */
 #define i2c_device_pm_suspend	NULL
@@ -622,8 +622,8 @@ static int i2c_trylock_adapter(struct i2c_adapter *adapter)
 
 	if (parent)
 		return i2c_trylock_adapter(parent);
-	else
-		return rt_mutex_trylock(&adapter->bus_lock);
+
+	return rt_mutex_trylock(&adapter->bus_lock);
 }
 
 /**
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ