spmi: Add check for NULL and invalid controller pointer

Replace the BUG_ON() check with a NULL pointer check and verify that
the controller type is set appropriately.  This prevents a system crash
due to invalid input.

Change-Id: I858980ad54ba0d764219049a20b4ca3e9b77f72e
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
1 file changed