Re: [PATCH v2] media: si2165: fix a missing check of return value

2019-03-06 Thread Matthias Schwarzott
Am 05.03.19 um 22:17 schrieb Sean Young: > On Fri, Dec 21, 2018 at 09:24:46AM +0100, Matthias Schwarzott wrote: >> Am 21.12.18 um 05:54 schrieb Kangjie Lu: >>> si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find >>> that "val_tmp" will be an uninitialized value when regmap_read

Re: [PATCH v2] media: si2165: fix a missing check of return value

2019-03-05 Thread Sean Young
On Fri, Dec 21, 2018 at 09:24:46AM +0100, Matthias Schwarzott wrote: > Am 21.12.18 um 05:54 schrieb Kangjie Lu: > > si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find > > that "val_tmp" will be an uninitialized value when regmap_read() fails. > > "val_tmp" is then assigned to

Re: [PATCH v2] media: si2165: fix a missing check of return value

2018-12-21 Thread Matthias Schwarzott
Am 21.12.18 um 05:54 schrieb Kangjie Lu: > si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find > that "val_tmp" will be an uninitialized value when regmap_read() fails. > "val_tmp" is then assigned to "val". So if si2165_readreg8() fails, > "val" will be a random value. Further

[PATCH v2] media: si2165: fix a missing check of return value

2018-12-20 Thread Kangjie Lu
si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find that "val_tmp" will be an uninitialized value when regmap_read() fails. "val_tmp" is then assigned to "val". So if si2165_readreg8() fails, "val" will be a random value. Further use will lead to undefined behaviors. The fix ch