mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Staging: vc04_services: Fix a couple error codes
[ Upstream commitca4e4efbef] These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes:7b3ad5abf0("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: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
155656d0e3
commit
f1c62cdf80
@@ -579,7 +579,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,
|
||||
@@ -603,7 +603,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,
|
||||
|
||||
Reference in New Issue
Block a user