diff options
Diffstat (limited to 'linux/drivers/media/video/saa5249.c')
-rw-r--r-- | linux/drivers/media/video/saa5249.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c index 12f48ebd3..b7cf17361 100644 --- a/linux/drivers/media/video/saa5249.c +++ b/linux/drivers/media/video/saa5249.c @@ -46,7 +46,6 @@ #include <linux/mm.h> #include <linux/init.h> #include <linux/i2c.h> -#include <linux/smp_lock.h> #include <linux/mutex.h> #include <linux/delay.h> #include <linux/videotext.h> @@ -61,7 +60,7 @@ MODULE_AUTHOR("Michael Geng <linux@MichaelGeng.de>"); MODULE_DESCRIPTION("Philips SAA5249 Teletext decoder driver"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x11, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -604,6 +603,7 @@ static int saa5249_probe(struct i2c_client *client, /* Now create a video4linux device */ t->vdev = video_device_alloc(); if (t->vdev == NULL) { + kfree(t); kfree(client); return -ENOMEM; } @@ -623,9 +623,8 @@ static int saa5249_probe(struct i2c_client *client, /* Register it */ err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); if (err < 0) { - kfree(t); video_device_release(t->vdev); - t->vdev = NULL; + kfree(t); return err; } return 0; |