mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-02 00:40:59 -05:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Building mei-amt-version.o triggers a GCC warning:
Documentation/misc-devices/mei/mei-amt-version.c: In function 'main':
Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning: 'acmd.fd' is used uninitialized in this function [-Wuninitialized]
if (cl->fd != -1)
^
Documentation/misc-devices/mei/mei-amt-version.c:443:21: note: 'acmd.fd' was declared here
struct amt_host_if acmd;
^
GCC is correct. See, the call chain that GCC detects must be
main()
amt_host_if_init()
mei_init()
mei_deinit()
But when we enter mei_deinit() struct amt_host_if acmd is still
unitialized. That makes the test for (effectively) amt_host_if->mei_cl->fd
bogus.
But it turns out that call of mei_deinit() isn't needed at all. All of
the members of mei_cl will be set later in mei_init() and none will be
used before they are set. So we can simply drop this call of
mei_deinit().
Signed-off-by: Paul Bolle <[email protected]>
Cc: Tomas Winkler <[email protected]>
Reported-by: David Howells <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
||
| .. | ||
| mei | ||
| ad525x_dpot.txt | ||
| apds990x.txt | ||
| bh1770glc.txt | ||
| c2port.txt | ||
| eeprom | ||
| ics932s401 | ||
| isl29003 | ||
| lis3lv02d | ||
| max6875 | ||
| spear-pcie-gadget.txt | ||