diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-24 22:32:14 +0200 |
---|---|---|
committer | Martyn Welch <martyn.welch@collabora.co.uk> | 2017-10-13 21:32:01 +0100 |
commit | 8af70cd9d6dec3fb968613a8d5318039ac5497b1 (patch) | |
tree | 7d0800646b4aef1ca0ee7d1e02e8eea5dbd2da38 /drivers/vme/vme.c | |
parent | 61282c04984e405d3c79300e6008c3f5d60c280a (diff) | |
download | linux-8af70cd9d6dec3fb968613a8d5318039ac5497b1.tar.bz2 |
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/vme.c')
-rw-r--r-- | drivers/vme/vme.c | 10 |
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) 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 = { |