aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/soc_camera.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index f2032939fd4b..a499cacec1f3 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -779,9 +779,12 @@ static int soc_camera_s_crop(struct file *file, void *fh,
779 ret = ici->ops->get_crop(icd, &current_crop); 779 ret = ici->ops->get_crop(icd, &current_crop);
780 780
781 /* Prohibit window size change with initialised buffers */ 781 /* Prohibit window size change with initialised buffers */
782 if (icf->vb_vidq.bufs[0] && !ret && 782 if (ret < 0) {
783 (a->c.width != current_crop.c.width || 783 dev_err(&icd->dev,
784 a->c.height != current_crop.c.height)) { 784 "S_CROP denied: getting current crop failed\n");
785 } else if (icf->vb_vidq.bufs[0] &&
786 (a->c.width != current_crop.c.width ||
787 a->c.height != current_crop.c.height)) {
785 dev_err(&icd->dev, 788 dev_err(&icd->dev,
786 "S_CROP denied: queue initialised and sizes differ\n"); 789 "S_CROP denied: queue initialised and sizes differ\n");
787 ret = -EBUSY; 790 ret = -EBUSY;