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:
parent
61282c0498
commit
8af70cd9d6
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue