diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 09:59:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 09:59:29 -0700 |
commit | 296e1ce0dc36bb106c139e25482d02da43c70e71 (patch) | |
tree | b473ef8735dbdf437ae8caf1bb0e742e9fda342a /drivers/media/video/cx18/cx18-driver.c | |
parent | b14ea38e13686799b9d2545d467a0ec84732981c (diff) | |
parent | becd43056c8f65e3b8510b1a8a0940683ee185a2 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (36 commits)
V4L/DVB (9336): cx88: always de-alloc frontends on fault condition
V4L/DVB (9335): videobuf: split unregister bus creating self-contained frontend de-allocator
V4L/DVB (9334): cx88: dvb_remove debug output
V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontends
V4L/DVB (9332): cx88: initial fix for analogue only compilation
V4L/DVB (9331): Remove unused inode parameter from video_ioctl2
V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()
V4L/DVB (9328): ivtvfb: FB_BLANK_POWERDOWN turns off video output
V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
V4L/DVB (9326): ivtv: avoid green flashing when loading ivtv
V4L/DVB (9325): ivtv: switch to unlocked_ioctl.
V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
V4L/DVB (9323): v4l2-int-if: Add enum_framesizes and enum_frameintervals ioctls.
V4L/DVB (9322): v4l2-int-if: Export more interfaces to modules
V4L/DVB (9321): v4l2-int-if: Define new power state changes
V4L/DVB (9320): v4l2: Add 10-bit RAW Bayer formats
V4L/DVB (9319): v4l2-int-if: Add cropcap, g_crop and s_crop commands.
V4L/DVB (9318): v4l2-int-if: Add command to get slave private data.
V4L/DVB (9316): s5h1411: Power down s5h1411 when not in use
V4L/DVB (9315): s5h1411: Skip reconfiguring demod modulation if already at the desired modulation
...
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 085121c2b47..7a1a7830a6b 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -613,6 +613,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) { int retval = 0; + int i; int vbi_buf_size; u32 devtype; struct cx18 *cx; @@ -698,7 +699,8 @@ static int __devinit cx18_probe(struct pci_dev *dev, /* active i2c */ CX18_DEBUG_INFO("activating i2c...\n"); - if (init_cx18_i2c(cx)) { + retval = init_cx18_i2c(cx); + if (retval) { CX18_ERR("Could not initialize i2c\n"); goto free_map; } @@ -836,8 +838,11 @@ err: CX18_ERR("Error %d on initialization\n", retval); cx18_log_statistics(cx); - kfree(cx18_cards[cx18_cards_active]); - cx18_cards[cx18_cards_active] = NULL; + i = cx->num; + spin_lock(&cx18_cards_lock); + kfree(cx18_cards[i]); + cx18_cards[i] = NULL; + spin_unlock(&cx18_cards_lock); return retval; } |