staging: vc04_services: bcm2835-camera: Modify return statement.
authorVatsala Narang <vatsalanarang@gmail.com>
Sat, 27 Apr 2019 16:07:49 +0000 (21:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Apr 2019 13:00:31 +0000 (15:00 +0200)
Modify return statement and remove the respective assignment.

Issue found by Coccinelle.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/controls.c

index 2e0a422cdf3e4e18451d632180e74464bb5ea8c4..9841c30450ce361b394954a4141ff84b8fe42fd5 100644 (file)
@@ -270,11 +270,9 @@ static int ctrl_set_rotate(struct bm2835_mmal_dev *dev,
        if (ret < 0)
                return ret;
 
-       ret = vchiq_mmal_port_parameter_set(dev->instance, &camera->output[2],
+       return vchiq_mmal_port_parameter_set(dev->instance, &camera->output[2],
                                            mmal_ctrl->mmal_id,
                                            &u32_value, sizeof(u32_value));
-
-       return ret;
 }
 
 static int ctrl_set_flip(struct bm2835_mmal_dev *dev,
@@ -313,11 +311,9 @@ static int ctrl_set_flip(struct bm2835_mmal_dev *dev,
        if (ret < 0)
                return ret;
 
-       ret = vchiq_mmal_port_parameter_set(dev->instance, &camera->output[2],
+       return vchiq_mmal_port_parameter_set(dev->instance, &camera->output[2],
                                            mmal_ctrl->mmal_id,
                                            &u32_value, sizeof(u32_value));
-
-       return ret;
 }
 
 static int ctrl_set_exposure(struct bm2835_mmal_dev *dev,