diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-16 18:23:19 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-16 18:23:19 -0500 |
commit | 2615510561f94f4ed387ebad1dd5896e2a62ab60 (patch) | |
tree | 0e3b57896f04826e16d8f1c494d3f996eb21c101 /linux/drivers/media/common/tuners | |
parent | 41e77d1f0a36b105066e184a540cbd98e4f7caf0 (diff) | |
download | mediapointer-dvb-s2-2615510561f94f4ed387ebad1dd5896e2a62ab60.tar.gz mediapointer-dvb-s2-2615510561f94f4ed387ebad1dd5896e2a62ab60.tar.bz2 |
xc5000: check xc5000_readreg return value for XC_RESULT_SUCCESS
From: Devin Heitmueller <devin.heitmueller@gmail.com>
Make return value checking for calls to i2c routines explicit.
Priority: normal
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common/tuners')
-rw-r--r-- | linux/drivers/media/common/tuners/xc5000.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/common/tuners/xc5000.c b/linux/drivers/media/common/tuners/xc5000.c index 2945075d5..0b2602d84 100644 --- a/linux/drivers/media/common/tuners/xc5000.c +++ b/linux/drivers/media/common/tuners/xc5000.c @@ -447,7 +447,7 @@ static int xc_get_frequency_error(struct xc5000_priv *priv, u32 *freq_error_hz) u32 tmp; result = xc5000_readreg(priv, XREG_FREQ_ERROR, ®Data); - if (result) + if (result != XC_RESULT_SUCCESS) return result; tmp = (u32)regData; @@ -468,7 +468,7 @@ static int xc_get_version(struct xc5000_priv *priv, int result; result = xc5000_readreg(priv, XREG_VERSION, &data); - if (result) + if (result != XC_RESULT_SUCCESS) return result; (*hw_majorversion) = (data >> 12) & 0x0F; @@ -485,7 +485,7 @@ static int xc_get_hsync_freq(struct xc5000_priv *priv, u32 *hsync_freq_hz) int result; result = xc5000_readreg(priv, XREG_HSYNC_FREQ, ®Data); - if (result) + if (result != XC_RESULT_SUCCESS) return result; (*hsync_freq_hz) = ((regData & 0x0fff) * 763)/100; @@ -979,7 +979,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, /* Check if firmware has been loaded. It is possible that another instance of the driver has loaded the firmware. */ - if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != 0) + if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != XC_RESULT_SUCCESS) goto fail; switch (id) { |