* re: iio: light: new driver for the ROHM BH1780
@ 2016-04-28 9:40 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-04-28 9:40 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-iio
Hello Linus Walleij,
This is a semi-automatic email about new static checker warnings.
The patch 1f0477f18306: "iio: light: new driver for the ROHM BH1780"
from Apr 11, 2016, leads to the following Smatch complaint:
drivers/iio/light/bh1780.c:93 bh1780_debugfs_reg_access()
error: we previously assumed 'readval' could be null (see line 86)
drivers/iio/light/bh1780.c
85
86 if (!readval)
^^^^^^^^
87 bh1780_write(bh1780, (u8)reg, (u8)writeval);
Should this be:
return bh1780_write(bh1780, (u8)reg, (u8)writeval);
88
89 ret = bh1780_read(bh1780, (u8)reg);
90 if (ret < 0)
91 return ret;
92
93 *readval = ret;
^^^^^^^^
94
95 return 0;
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-28 9:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 9:40 iio: light: new driver for the ROHM BH1780 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).