diff options
author | Devin Heitmueller <devin.heitmueller@gmail.com> | 2008-11-16 18:23:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:05 -0400 |
commit | 7988fc216d41dfc8325d192360ccb702736b3e69 (patch) | |
tree | bb6c645e90c4545424eabc16a7e7820191b70ac6 /drivers/media/common | |
parent | d7800d4ea977fa323d1529850ecc499b82df6884 (diff) |
V4L/DVB (11789): xc5000: check xc5000_readreg return value for XC_RESULT_SUCCESS
Make return value checking for calls to i2c routines explicit.
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/tuners/xc5000.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 7d83deca9e02..c787d39908b6 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c | |||
@@ -428,7 +428,7 @@ static int xc_get_frequency_error(struct xc5000_priv *priv, u32 *freq_error_hz) | |||
428 | u32 tmp; | 428 | u32 tmp; |
429 | 429 | ||
430 | result = xc5000_readreg(priv, XREG_FREQ_ERROR, ®Data); | 430 | result = xc5000_readreg(priv, XREG_FREQ_ERROR, ®Data); |
431 | if (result) | 431 | if (result != XC_RESULT_SUCCESS) |
432 | return result; | 432 | return result; |
433 | 433 | ||
434 | tmp = (u32)regData; | 434 | tmp = (u32)regData; |
@@ -449,7 +449,7 @@ static int xc_get_version(struct xc5000_priv *priv, | |||
449 | int result; | 449 | int result; |
450 | 450 | ||
451 | result = xc5000_readreg(priv, XREG_VERSION, &data); | 451 | result = xc5000_readreg(priv, XREG_VERSION, &data); |
452 | if (result) | 452 | if (result != XC_RESULT_SUCCESS) |
453 | return result; | 453 | return result; |
454 | 454 | ||
455 | (*hw_majorversion) = (data >> 12) & 0x0F; | 455 | (*hw_majorversion) = (data >> 12) & 0x0F; |
@@ -466,7 +466,7 @@ static int xc_get_hsync_freq(struct xc5000_priv *priv, u32 *hsync_freq_hz) | |||
466 | int result; | 466 | int result; |
467 | 467 | ||
468 | result = xc5000_readreg(priv, XREG_HSYNC_FREQ, ®Data); | 468 | result = xc5000_readreg(priv, XREG_HSYNC_FREQ, ®Data); |
469 | if (result) | 469 | if (result != XC_RESULT_SUCCESS) |
470 | return result; | 470 | return result; |
471 | 471 | ||
472 | (*hsync_freq_hz) = ((regData & 0x0fff) * 763)/100; | 472 | (*hsync_freq_hz) = ((regData & 0x0fff) * 763)/100; |
@@ -960,7 +960,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, | |||
960 | /* Check if firmware has been loaded. It is possible that another | 960 | /* Check if firmware has been loaded. It is possible that another |
961 | instance of the driver has loaded the firmware. | 961 | instance of the driver has loaded the firmware. |
962 | */ | 962 | */ |
963 | if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != 0) | 963 | if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != XC_RESULT_SUCCESS) |
964 | goto fail; | 964 | goto fail; |
965 | 965 | ||
966 | switch (id) { | 966 | switch (id) { |