diff options
author | Holger Waechtler <devnull@localhost> | 2003-01-09 19:52:41 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-01-09 19:52:41 +0000 |
commit | 7a3f9d523410405ddeb5a18045135d08a81981a0 (patch) | |
tree | 7516568d3a5d1d29bddc8af642486e7f18b430c5 /linux/drivers/media | |
parent | d8d2dc0fd295625373e68f23931f8ceee1990277 (diff) | |
download | mediapointer-dvb-s2-7a3f9d523410405ddeb5a18045135d08a81981a0.tar.gz mediapointer-dvb-s2-7a3f9d523410405ddeb5a18045135d08a81981a0.tar.bz2 |
return meaningful error values
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/common/saa7146_i2c.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index 9a62cb176..12d4ad655 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -56,7 +56,7 @@ int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op) size. if we exceed this limit... */ if ( (4*mem) > SAA7146_I2C_MEM ) { //fm DEB_I2C(("cannot prepare i2c-message.\n")); - return -1; + return -ENOMEM; } /* be careful: clear out the i2c-mem first */ @@ -253,9 +253,10 @@ int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword) /* we handle address-errors here */ if( 0 != (status & SAA7146_I2C_APERR) ) { DEB_I2C(("error in address phase.\n")); - return -2; + return -EREMOTEIO; } - return -1; + + return -EIO; } /* read back data, just in case we were reading ... */ |