diff options
author | Kuo-Jung Su <dantesu@faraday-tech.com> | 2013-12-30 17:20:57 +0800 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2014-01-13 08:18:38 +0100 |
commit | dccacbe01968f9e682cb1dc9b7d43c831897cbec (patch) | |
tree | f46847b96745ec148668c00e26098d4bdeca4a82 | |
parent | 32d041e218c6a22e92d91629902fd03a90934b6a (diff) | |
download | u-boot-midas-dccacbe01968f9e682cb1dc9b7d43c831897cbec.tar.gz u-boot-midas-dccacbe01968f9e682cb1dc9b7d43c831897cbec.tar.bz2 u-boot-midas-dccacbe01968f9e682cb1dc9b7d43c831897cbec.zip |
i2c: fti2c010: fix compiler warning on paddr[]
This fixes the following compiler warnings:
fti2c010.c: In function 'fti2c010_read':
fti2c010.c:204:8: warning: 'paddr' may be used uninitialized in this function [-Wuninitialized]
fti2c010.c: In function 'fti2c010_write':
fti2c010.c:266:8: warning: 'paddr' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
Cc: Heiko Schocher <hs@denx.de>
-rw-r--r-- | drivers/i2c/fti2c010.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/fti2c010.c b/drivers/i2c/fti2c010.c index fb9fa353d1..68d9a42912 100644 --- a/drivers/i2c/fti2c010.c +++ b/drivers/i2c/fti2c010.c @@ -201,7 +201,7 @@ static int fti2c010_read(struct i2c_adapter *adap, struct fti2c010_chip *chip = chip_list + adap->hwadapnr; struct fti2c010_regs *regs = chip->regs; int ret, pos; - uchar paddr[4]; + uchar paddr[4] = { 0 }; to_i2c_addr(paddr, addr, alen); @@ -263,7 +263,7 @@ static int fti2c010_write(struct i2c_adapter *adap, struct fti2c010_chip *chip = chip_list + adap->hwadapnr; struct fti2c010_regs *regs = chip->regs; int ret, pos; - uchar paddr[4]; + uchar paddr[4] = { 0 }; to_i2c_addr(paddr, addr, alen); |