aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-06 16:11:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-06 16:11:57 -0700
commit28b8383d5d4d9b636c3734c993563bafdc2ab3c3 (patch)
tree95fd3fc6e12cdca5cbf999595273bda9ae104922
parentc28cf0fdcd38e912fa72258d78cb213b716247d6 (diff)
parenta80c5aa6da485da63def31442a19cdd6ff495ce6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: V4L/DVB (7499): v4l/dvb Kconfig: Fix bugzilla #10067 V4L/DVB (7495): s5h1409: fix blown-away bit in function s5h1409_set_gpio V4L/DVB (7460): bttv: Bt832 - fix possible NULL pointer deref
-rw-r--r--drivers/media/Makefile3
-rw-r--r--drivers/media/dvb/frontends/s5h1409.c2
-rw-r--r--drivers/media/video/bt8xx/bt832.c12
3 files changed, 15 insertions, 2 deletions
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 8cf91353b56..7b8bb6949f5 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -6,3 +6,6 @@ obj-y := common/
obj-y += video/
obj-$(CONFIG_VIDEO_DEV) += radio/
obj-$(CONFIG_DVB_CORE) += dvb/
+ifeq ($(CONFIG_DVB_CORE),)
+ obj-$(CONFIG_VIDEO_TUNER) += dvb/frontends/
+endif
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c
index 819433485d3..1a4d8319773 100644
--- a/drivers/media/dvb/frontends/s5h1409.c
+++ b/drivers/media/dvb/frontends/s5h1409.c
@@ -445,7 +445,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable)
s5h1409_readreg(state, 0xe3) | 0x1100);
else
return s5h1409_writereg(state, 0xe3,
- s5h1409_readreg(state, 0xe3) & 0xeeff);
+ s5h1409_readreg(state, 0xe3) & 0xfeff);
}
static int s5h1409_sleep(struct dvb_frontend* fe, int enable)
diff --git a/drivers/media/video/bt8xx/bt832.c b/drivers/media/video/bt8xx/bt832.c
index a5187613788..f92f06dec0d 100644
--- a/drivers/media/video/bt8xx/bt832.c
+++ b/drivers/media/video/bt8xx/bt832.c
@@ -97,6 +97,11 @@ int bt832_init(struct i2c_client *i2c_client_s)
int rc;
buf=kmalloc(65,GFP_KERNEL);
+ if (!buf) {
+ v4l_err(&t->client,
+ "Unable to allocate memory. Detaching.\n");
+ return 0;
+ }
bt832_hexdump(i2c_client_s,buf);
if(buf[0x40] != 0x31) {
@@ -211,7 +216,12 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
switch (cmd) {
case BT832_HEXDUMP: {
unsigned char *buf;
- buf=kmalloc(65,GFP_KERNEL);
+ buf = kmalloc(65, GFP_KERNEL);
+ if (!buf) {
+ v4l_err(&t->client,
+ "Unable to allocate memory\n");
+ break;
+ }
bt832_hexdump(&t->client,buf);
kfree(buf);
}