[media] cec: don't set fh to NULL in CEC_TRANSMIT
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 16 Jul 2016 12:59:18 +0000 (09:59 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Jul 2016 16:24:09 +0000 (13:24 -0300)
commit4eef404fd91543dc82be2bd05d3b29919ec6c0e6
treed61d02b734d25083e2827b4f41d9f261fa610d05
parent40df3a7e586df59190547fe0e7d9928da735eada
[media] cec: don't set fh to NULL in CEC_TRANSMIT

The filehandle was set to NULL when in non-blocking mode or when
no reply is needed.

This is wrong: the filehandle is needed in non-blocking mode to ensure
that the result of the transmit can be obtained through CEC_RECEIVE.

And the 'reply' check was also incorrect since it should have checked the
timeout field (the reply can be 0). In any case, when in blocking mode
there is no need to set the fh to NULL either.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/cec/cec-api.c