Skip to content

Commit

Permalink
[media] s5p-mfc: Fix an error check
Browse files Browse the repository at this point in the history
Checking unsigned variable for negative value always returns false.
Hence make this value signed as we expect it to be negative too.
Fixes the following smatch warning:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:572
s5p_mfc_set_enc_ref_buffer_v6() warn: unsigned 'buf_size1' is never
less than zero.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Jan 6, 2013
1 parent b311ea4 commit 4a9c85a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ void s5p_mfc_get_enc_frame_buffer_v6(struct s5p_mfc_ctx *ctx,
int s5p_mfc_set_enc_ref_buffer_v6(struct s5p_mfc_ctx *ctx)
{
struct s5p_mfc_dev *dev = ctx->dev;
size_t buf_addr1, buf_size1;
int i;
size_t buf_addr1;
int i, buf_size1;

mfc_debug_enter();

Expand Down

0 comments on commit 4a9c85a

Please sign in to comment.