[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dab1287a-3748-baec-2ace-b7467885be1c@users.sourceforge.net>
Date: Fri, 25 Aug 2017 18:00:44 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: devel@...verdev.osuosl.org, Aaron Sierra <asierra@...-inc.com>,
Alessio Igor Bogani <alessio.bogani@...ttra.eu>,
Arnd Bergmann <arnd@...db.de>,
Augusto Mecking Caringi <augustocaringi@...il.com>,
Baoyou Xie <baoyou.xie@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Manohar Vanga <manohar.vanga@...il.com>,
Martyn Welch <martyn@...chs.me.uk>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 05/14] vme: Return directly in two functions
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 24 Aug 2017 22:32:14 +0200
Return directly without using an intermediate local variable
in these functions.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/vme/vme.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
index a2e36e6a0d84..986799d64993 100644
--- a/drivers/vme/vme.c
+++ b/drivers/vme/vme.c
@@ -1996,28 +1996,26 @@ static int vme_bus_match(struct device *dev, struct device_driver *drv)
static int vme_bus_probe(struct device *dev)
{
- int retval = -ENODEV;
struct vme_driver *driver;
struct vme_dev *vdev = dev_to_vme_dev(dev);
driver = dev->platform_data;
if (driver->probe)
- retval = driver->probe(vdev);
+ return driver->probe(vdev);
- return retval;
+ return -ENODEV;
}
static int vme_bus_remove(struct device *dev)
{
- int retval = -ENODEV;
struct vme_driver *driver;
struct vme_dev *vdev = dev_to_vme_dev(dev);
driver = dev->platform_data;
if (driver->remove)
- retval = driver->remove(vdev);
+ return driver->remove(vdev);
- return retval;
+ return -ENODEV;
}
struct bus_type vme_bus_type = {
--
2.14.0
Powered by blists - more mailing lists