[media] vb2: call buf_finish after the state check
[media] vb2: call buf_finish after the state check

Don't call buf_finish unless we know that the buffer is in a valid state.

Signed-off-by: Hans Verkuil <3a513708f73c27e7d36ebc496aa41dad6a3153ea@cisco.com>
Acked-by: Sakari Ailus <8d98c2be02a446df653daa2c00496b87f3f016e4@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <0cae1d1e981e84d16b82ca3d17be8a7f826608d3@samsung.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs