summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-11-20 08:02:44 +0100
committerErik Andrén <erik.andren@gmail.com>2008-11-20 08:02:44 +0100
commit5fca367f7519ebcbfb5372997f87187bcf112843 (patch)
tree86821e24aaf46718a7d55ad2f4ec16d7c7fcd3bd /linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
parentb5f8746408edc42ff529198b54e61760d3b9f8f3 (diff)
downloadmediapointer-dvb-s2-5fca367f7519ebcbfb5372997f87187bcf112843.tar.gz
mediapointer-dvb-s2-5fca367f7519ebcbfb5372997f87187bcf112843.tar.bz2
Cleanup the s5k4aa error handling, cull some comments
From: Erik Andrén <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c')
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
index 4f7c6b8e4..854f3f7f1 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
+++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
@@ -110,6 +110,7 @@ int s5k4aa_probe(struct sd *sd)
return -ENODEV;
else
info("Detected a s5k4aa sensor");
+
sensor_found:
sd->gspca_dev.cam.cam_mode = s5k4aa.modes;
sd->gspca_dev.cam.nmodes = s5k4aa.nmodes;
@@ -156,7 +157,7 @@ int s5k4aa_read_sensor(struct sd *sd, const u8 address,
"0x%x containing 0x%x ", address, *i2c_data);
}
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_write_sensor(struct sd *sd, const u8 address,
@@ -285,7 +286,7 @@ int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
*val |= data;
PDEBUG(D_V4L2, "Read exposure %d", *val);
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
@@ -305,7 +306,7 @@ int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
data = val & 0xff;
err = s5k4aa_write_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1);
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
@@ -323,7 +324,7 @@ int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
PDEBUG(D_V4L2, "Read vertical flip %d", *val);
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
@@ -361,7 +362,7 @@ int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
err = s5k4aa_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
}
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
@@ -378,7 +379,7 @@ int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
*val = (data & S5K4AA_RM_H_FLIP) >> 6;
PDEBUG(D_V4L2, "Read horizontal flip %d", *val);
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
@@ -417,7 +418,7 @@ int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
err = s5k4aa_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
}
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
@@ -435,7 +436,7 @@ int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
PDEBUG(D_V4L2, "Read gain %d", *val);
out:
- return (err < 0) ? err : 0;
+ return err;
}
int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val)
@@ -453,7 +454,7 @@ int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val)
err = s5k4aa_write_sensor(sd, S5K4AA_GAIN_2, &data, 1);
out:
- return (err < 0) ? err : 0;
+ return err;
}
void s5k4aa_dump_registers(struct sd *sd)