spi/omap2_mcspi: fix NULL pointer dereference
authorScott Ellis <scott@jumpnowtek.com>
Wed, 10 Mar 2010 21:22:45 +0000 (14:22 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 10 Mar 2010 21:22:45 +0000 (14:22 -0700)
Check spi->controller_state before dereferencing.

Shows up NULL here when using spi_alloc_device()/spi_add_device()
and spi_add_device() fails before spi_setup(). Calling spi_dev_put()
on the leftover spi_device results in the error.

Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

No differences found