diff options
author | Darron Broad <darron@kewl.org> | 2008-10-03 10:50:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-13 10:25:10 -0400 |
commit | 4aae8efb4908fa3f80dc1177d093443bc09adf5f (patch) | |
tree | 74af0e3af0db32f1da7ecd784607a63883f0c641 /drivers/media/dvb | |
parent | 01a8f038c07c4119029c63f1ed1c6ac986665d48 (diff) |
V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API.
Quick fix to stop an OOPS if illegal commands are dumped in S2API.
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 4c3f0d7e355c..f44b64b8e614 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -848,6 +848,13 @@ void dtv_property_dump(struct dtv_property *tvp) | |||
848 | { | 848 | { |
849 | int i; | 849 | int i; |
850 | 850 | ||
851 | if( (tvp->cmd <= 0 || tvp->cmd > DTV_DELIVERY_SYSTEM) && | ||
852 | tvp->cmd != DTV_API_VERSION) { | ||
853 | printk("%s: tvp.cmd = 0x%08x (undefined/unknown/invalid)\n", | ||
854 | __func__, tvp->cmd); | ||
855 | return; | ||
856 | } | ||
857 | |||
851 | printk("%s() tvp.cmd = 0x%08x (%s)\n" | 858 | printk("%s() tvp.cmd = 0x%08x (%s)\n" |
852 | ,__FUNCTION__ | 859 | ,__FUNCTION__ |
853 | ,tvp->cmd | 860 | ,tvp->cmd |