Skip to content

Commit

Permalink
media: davinci: don't override the error code
Browse files Browse the repository at this point in the history
As warned by Coverity:
	CID 1415211 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value:
	Assigning value -22 to ret here, but that stored value is
	overwritten before it can be used.

On all cases where the there's a goto 'unlock_out' or 'streamof',
ret was filled with a non-sero value. It toesn't make sense to override
such error code with a videobuf_streamoff() error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
Mauro Carvalho Chehab authored and Mauro Carvalho Chehab committed May 4, 2018
1 parent fd901b6 commit 366b401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/davinci/vpfe_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ static int vpfe_streamon(struct file *file, void *priv,
unlock_out:
mutex_unlock(&vpfe_dev->lock);
streamoff:
ret = videobuf_streamoff(&vpfe_dev->buffer_queue);
videobuf_streamoff(&vpfe_dev->buffer_queue);
return ret;
}

Expand Down

0 comments on commit 366b401

Please sign in to comment.