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>
This commit is contained in:
Markus Elfring 2017-08-24 22:32:14 +02:00 коммит произвёл Martyn Welch
Родитель 61282c0498
Коммит 8af70cd9d6
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -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 = {