mei: bus: make a client pointer always available
authorAlexander Usyskin <alexander.usyskin@intel.com>
Wed, 16 Nov 2016 20:51:28 +0000 (22:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Nov 2016 15:37:49 +0000 (16:37 +0100)
commitc110cdb171488c60295d49fda16634cfec58ae28
treef3edd6897111ed220fcd73358b3aa293d721f788
parentbd47b5269dbb316211fee18c706d015adbf1d696
mei: bus: make a client pointer always available

Change life time of the client pointer, allocate it upon client device
creation and free it upon device destruction, instead of upon
connection and disconnection.
This helps to eliminate racy NULL checks in the bus code.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus.c