Skip to content
Snippets Groups Projects
Commit dccacbe0 authored by Kuo-Jung Su's avatar Kuo-Jung Su Committed by Heiko Schocher
Browse files

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: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
Cc: Heiko Schocher <hs@denx.de>
parent 32d041e2
No related branches found
No related tags found
No related merge requests found
...@@ -201,7 +201,7 @@ static int fti2c010_read(struct i2c_adapter *adap, ...@@ -201,7 +201,7 @@ static int fti2c010_read(struct i2c_adapter *adap,
struct fti2c010_chip *chip = chip_list + adap->hwadapnr; struct fti2c010_chip *chip = chip_list + adap->hwadapnr;
struct fti2c010_regs *regs = chip->regs; struct fti2c010_regs *regs = chip->regs;
int ret, pos; int ret, pos;
uchar paddr[4]; uchar paddr[4] = { 0 };
to_i2c_addr(paddr, addr, alen); to_i2c_addr(paddr, addr, alen);
...@@ -263,7 +263,7 @@ static int fti2c010_write(struct i2c_adapter *adap, ...@@ -263,7 +263,7 @@ static int fti2c010_write(struct i2c_adapter *adap,
struct fti2c010_chip *chip = chip_list + adap->hwadapnr; struct fti2c010_chip *chip = chip_list + adap->hwadapnr;
struct fti2c010_regs *regs = chip->regs; struct fti2c010_regs *regs = chip->regs;
int ret, pos; int ret, pos;
uchar paddr[4]; uchar paddr[4] = { 0 };
to_i2c_addr(paddr, addr, alen); to_i2c_addr(paddr, addr, alen);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment