summaryrefslogtreecommitdiffstats
path: root/drivers/vme
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-24 16:32:14 -0400
committerMartyn Welch <martyn.welch@collabora.co.uk>2017-10-13 16:32:01 -0400
commit8af70cd9d6dec3fb968613a8d5318039ac5497b1 (patch)
tree7d0800646b4aef1ca0ee7d1e02e8eea5dbd2da38 /drivers/vme
parent61282c04984e405d3c79300e6008c3f5d60c280a (diff)
vme: Return directly in two functions
Return directly without using an intermediate local variable in these functions. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Martyn Welch <martyn@welchs.me.uk>
Diffstat (limited to 'drivers/vme')
-rw-r--r--drivers/vme/vme.c10
1 files 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)
1996 1996
1997static int vme_bus_probe(struct device *dev) 1997static int vme_bus_probe(struct device *dev)
1998{ 1998{
1999 int retval = -ENODEV;
2000 struct vme_driver *driver; 1999 struct vme_driver *driver;
2001 struct vme_dev *vdev = dev_to_vme_dev(dev); 2000 struct vme_dev *vdev = dev_to_vme_dev(dev);
2002 2001
2003 driver = dev->platform_data; 2002 driver = dev->platform_data;
2004 if (driver->probe) 2003 if (driver->probe)
2005 retval = driver->probe(vdev); 2004 return driver->probe(vdev);
2006 2005
2007 return retval; 2006 return -ENODEV;
2008} 2007}
2009 2008
2010static int vme_bus_remove(struct device *dev) 2009static int vme_bus_remove(struct device *dev)
2011{ 2010{
2012 int retval = -ENODEV;
2013 struct vme_driver *driver; 2011 struct vme_driver *driver;
2014 struct vme_dev *vdev = dev_to_vme_dev(dev); 2012 struct vme_dev *vdev = dev_to_vme_dev(dev);
2015 2013
2016 driver = dev->platform_data; 2014 driver = dev->platform_data;
2017 if (driver->remove) 2015 if (driver->remove)
2018 retval = driver->remove(vdev); 2016 return driver->remove(vdev);
2019 2017
2020 return retval; 2018 return -ENODEV;
2021} 2019}
2022 2020
2023struct bus_type vme_bus_type = { 2021struct bus_type vme_bus_type = {