]> git.karo-electronics.de Git - karo-tx-linux.git/commit
V4L/DVB (12685): dvb-core: check fe->ops.set_frontend return value
authorJanne Grunau <j@jannau.net>
Tue, 1 Sep 2009 22:23:09 +0000 (19:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:20:03 +0000 (12:20 -0300)
commit01886255ddf440eb21d3388bfc5343c966904d0e
tree1357fb305de3fa62564b429843553ad2890a583d
parent4457ef1d6163533073efdebed82a049aad44e3b3
V4L/DVB (12685): dvb-core: check fe->ops.set_frontend return value

Various frontend driver have parameter checks in their set_frontend
functions and return an error if the parameters are not supported,
tda10021 and cx24116 to name two.

The tuning ioctls FE_SET_FRONTEND/FE_SET_PROPERTY only change values
in the property cache and return before set_frontend is called. If a
set_frontend call in software zigzag algorithm fails and the card was
previously locked it will report a lock and the new parameters but is
still tuned to the old transport. This is not detectable from
userspace.

This change checks the return values of fe->ops.set_frontend and
changes the state to the added FESTATE_ERROR for software zigzag.
No lock will be reported to userspace if the State is FESTATE_ERROR.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c