media: cec-core: fix a bug at cec_error_inj_write()
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Mar 2018 11:51:07 +0000 (07:51 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Mar 2018 12:37:22 +0000 (08:37 -0400)
commit98c1ce0ccff1617cba45e8ead236768a50545e7f
treeb92ef1d6c8f29462d4fa2a083a4038f18c5a7999
parentafdb4ca2be93d02cd1902395a7191097963dd8c1
media: cec-core: fix a bug at cec_error_inj_write()

If the adapter doesn't have error_inj_parse_line() ops, the
write() logic won't return -EINVAL, but, instead, it will keep
looping, because "count" is a non-negative number.

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