platform/x86: intel_scu_ipc: Rearrange init sequence
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 5 Apr 2017 16:05:25 +0000 (19:05 +0300)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:16:04 +0000 (10:16 -0700)
commit822e423e62d0f07574e3aaaa7e2c15ffab7815cc
tree5062d135bc8009235ba3c13497018431ac22017a
parentac207ded45f52b2a122eb947f3e1ab908c4a7ce8
platform/x86: intel_scu_ipc: Rearrange init sequence

Device pointer is used as a flag that everything is prepared.
Nevertheless the assignment happened quite before and there is a window
when a caller can get weird results or even crashes since not all fields
are initialized yet.

Rearrange initialization sequence in ->probe() to prepare everything
before use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_scu_ipc.c