diff options
Diffstat (limited to 'drivers/spi/spi-sh.c')
-rw-r--r-- | drivers/spi/spi-sh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi-sh.c b/drivers/spi/spi-sh.c index f6f2c7010177..03edf5ed0e9f 100644 --- a/drivers/spi/spi-sh.c +++ b/drivers/spi/spi-sh.c | |||
@@ -322,7 +322,8 @@ static void spi_sh_work(struct work_struct *work) | |||
322 | spin_lock_irqsave(&ss->lock, flags); | 322 | spin_lock_irqsave(&ss->lock, flags); |
323 | 323 | ||
324 | mesg->status = 0; | 324 | mesg->status = 0; |
325 | mesg->complete(mesg->context); | 325 | if (mesg->complete) |
326 | mesg->complete(mesg->context); | ||
326 | } | 327 | } |
327 | 328 | ||
328 | clear_fifo(ss); | 329 | clear_fifo(ss); |
@@ -340,7 +341,8 @@ static void spi_sh_work(struct work_struct *work) | |||
340 | 341 | ||
341 | error: | 342 | error: |
342 | mesg->status = ret; | 343 | mesg->status = ret; |
343 | mesg->complete(mesg->context); | 344 | if (mesg->complete) |
345 | mesg->complete(mesg->context); | ||
344 | 346 | ||
345 | spi_sh_clear_bit(ss, SPI_SH_SSA | SPI_SH_SSDB | SPI_SH_SSD, | 347 | spi_sh_clear_bit(ss, SPI_SH_SSA | SPI_SH_SSDB | SPI_SH_SSD, |
346 | SPI_SH_CR1); | 348 | SPI_SH_CR1); |