WSL2-Linux-Kernel/Documentation/misc-devices/mei
Paul Bolle aa98a28563 Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit()
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 <pebolle@tiscali.nl>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: David Howells <dhowells@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:20:20 -08:00
..
.gitignore mei: Documentation: add generated example binary into .gitignore file 2012-05-14 15:43:44 -07:00
Makefile mei: move doc files Documentation/misc-devices/mei 2012-05-09 13:59:09 -07:00
TODO mei: update MAINTAINERS file 2012-05-09 14:00:31 -07:00
mei-amt-version.c Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit() 2014-01-08 15:20:20 -08:00
mei-client-bus.txt mei: bus: Add device enabling and disabling API 2013-04-08 16:57:15 -07:00
mei.txt doc: fix misspellings with 'codespell' tool 2013-05-28 12:02:12 +02:00