summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-01-11 13:04:30 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-11 13:04:30 -0200
commitf6c316d761d2686a153d7de7a83118c35b7cb494 (patch)
tree2268e7006ed8d99e0e44617ef3849afba26f8865 /linux/drivers/media/video
parent73020b46e06d7107e869d9c03a18ef97e0ab52ab (diff)
downloadmediapointer-dvb-s2-f6c316d761d2686a153d7de7a83118c35b7cb494.tar.gz
mediapointer-dvb-s2-f6c316d761d2686a153d7de7a83118c35b7cb494.tar.bz2
zoran: Fix a few CodingStyle issues rised by the previous patch
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> CC: Jean Delvare <khali@linux-fr.org> CC: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/zoran/zoran_card.c67
1 files changed, 41 insertions, 26 deletions
diff --git a/linux/drivers/media/video/zoran/zoran_card.c b/linux/drivers/media/video/zoran/zoran_card.c
index 84edad6a7..925737e8f 100644
--- a/linux/drivers/media/video/zoran/zoran_card.c
+++ b/linux/drivers/media/video/zoran/zoran_card.c
@@ -1335,7 +1335,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
KERN_DEBUG
"%s: find_zr36057() - trying to autodetect card type\n",
ZR_DEVNAME(zr));
- for (i=0;i<NUM_CARDS;i++) {
+ for (i = 0; i < NUM_CARDS; i++) {
if (ss_vendor == zoran_cards[i].vendor_id &&
ss_device == zoran_cards[i].device_id) {
dprintk(3,
@@ -1434,7 +1434,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
}
if (i2c_dec_name) {
- if ((result = request_module(i2c_dec_name)) < 0) {
+ result = request_module(i2c_dec_name);
+ if (result < 0) {
dprintk(1,
KERN_ERR
"%s: failed to load module %s: %d\n",
@@ -1453,7 +1454,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
}
if (i2c_enc_name) {
- if ((result = request_module(i2c_enc_name)) < 0) {
+ result = request_module(i2c_enc_name);
+ if (result < 0) {
dprintk(1,
KERN_ERR
"%s: failed to load module %s: %d\n",
@@ -1473,22 +1475,28 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
KERN_INFO "%s: Initializing videocodec bus...\n",
ZR_DEVNAME(zr));
- if (zr->card.video_codec != 0 &&
- (codec_name = codecid_to_modulename(zr->card.video_codec)) != NULL) {
- if ((result = request_module(codec_name)) < 0) {
- dprintk(1,
- KERN_ERR
- "%s: failed to load modules %s: %d\n",
- ZR_DEVNAME(zr), codec_name, result);
+ if (zr->card.video_codec) {
+ codec_name = codecid_to_modulename(zr->card.video_codec);
+ if (codec_name) {
+ result = request_module(codec_name);
+ if (result) {
+ dprintk(1,
+ KERN_ERR
+ "%s: failed to load modules %s: %d\n",
+ ZR_DEVNAME(zr), codec_name, result);
+ }
}
}
- if (zr->card.video_vfe != 0 &&
- (vfe_name = codecid_to_modulename(zr->card.video_vfe)) != NULL) {
- if ((result = request_module(vfe_name)) < 0) {
- dprintk(1,
- KERN_ERR
- "%s: failed to load modules %s: %d\n",
- ZR_DEVNAME(zr), vfe_name, result);
+ if (zr->card.video_vfe) {
+ vfe_name = codecid_to_modulename(zr->card.video_vfe);
+ if (vfe_name) {
+ result = request_module(vfe_name);
+ if (result < 0) {
+ dprintk(1,
+ KERN_ERR
+ "%s: failed to load modules %s: %d\n",
+ ZR_DEVNAME(zr), vfe_name, result);
+ }
}
}
@@ -1557,23 +1565,30 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
return 0;
- // Init errors
- zr_detach_vfe:
+ /* Init errors */
+zr_detach_vfe:
videocodec_detach(zr->vfe);
- zr_free_vfe:
+
+zr_free_vfe:
kfree(master_vfe);
- zr_detach_codec:
+
+zr_detach_codec:
videocodec_detach(zr->codec);
- zr_free_codec:
+
+zr_free_codec:
kfree(master_codec);
- zr_unreg_i2c:
+
+zr_unreg_i2c:
zoran_unregister_i2c(zr);
- zr_free_irq:
+
+zr_free_irq:
btwrite(0, ZR36057_SPGPPCR);
free_irq(zr->pci_dev->irq, zr);
- zr_unmap:
+
+zr_unmap:
iounmap(zr->zr36057_mem);
- zr_free_mem:
+
+zr_free_mem:
kfree(zr);
return -ENODEV;