aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-13 14:07:18 +0300
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 12:21:32 -0400
commit05c7d4c51e75d332f10c35383f26af302fd82350 (patch)
treeba25c333c51027f8040df88830a5a1145a07b3ae
parenta3513225b7d52cffdf32528d2329fd58447e0931 (diff)
downloadlinux-yocto-05c7d4c51e75d332f10c35383f26af302fd82350.tar.gz
linux-yocto-05c7d4c51e75d332f10c35383f26af302fd82350.tar.bz2
linux-yocto-05c7d4c51e75d332f10c35383f26af302fd82350.zip
Staging: vc04_services: Fix a couple error codes
commit ca4e4efbefbbdde0a7bb3023ea08d491f4daf9b9 upstream. These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/staging/vc04_services/bcm2835-camera/controls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c
index cff7b1e07153..b688ebc01740 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
@@ -576,7 +576,7 @@ exit:
dev->colourfx.enable ? "true" : "false",
dev->colourfx.u, dev->colourfx.v,
ret, (ret == 0 ? 0 : -EINVAL));
- return (ret == 0 ? 0 : EINVAL);
+ return (ret == 0 ? 0 : -EINVAL);
}
static int ctrl_set_colfx(struct bm2835_mmal_dev *dev,
@@ -600,7 +600,7 @@ static int ctrl_set_colfx(struct bm2835_mmal_dev *dev,
"%s: After: mmal_ctrl:%p ctrl id:0x%x ctrl val:%d ret %d(%d)\n",
__func__, mmal_ctrl, ctrl->id, ctrl->val, ret,
(ret == 0 ? 0 : -EINVAL));
- return (ret == 0 ? 0 : EINVAL);
+ return (ret == 0 ? 0 : -EINVAL);
}
static int ctrl_set_bitrate(struct bm2835_mmal_dev *dev,