diff options
Diffstat (limited to 'drivers/media/video/saa5249.c')
-rw-r--r-- | drivers/media/video/saa5249.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 48b27fe48087..271d6e931b75 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -598,6 +598,7 @@ static int saa5249_probe(struct i2c_client *client, | |||
598 | /* Now create a video4linux device */ | 598 | /* Now create a video4linux device */ |
599 | t->vdev = video_device_alloc(); | 599 | t->vdev = video_device_alloc(); |
600 | if (t->vdev == NULL) { | 600 | if (t->vdev == NULL) { |
601 | kfree(t); | ||
601 | kfree(client); | 602 | kfree(client); |
602 | return -ENOMEM; | 603 | return -ENOMEM; |
603 | } | 604 | } |
@@ -617,9 +618,8 @@ static int saa5249_probe(struct i2c_client *client, | |||
617 | /* Register it */ | 618 | /* Register it */ |
618 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); | 619 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); |
619 | if (err < 0) { | 620 | if (err < 0) { |
620 | kfree(t); | ||
621 | video_device_release(t->vdev); | 621 | video_device_release(t->vdev); |
622 | t->vdev = NULL; | 622 | kfree(t); |
623 | return err; | 623 | return err; |
624 | } | 624 | } |
625 | return 0; | 625 | return 0; |