diff options
author | Robin Gong <b38343@freescale.com> | 2015-11-26 17:45:05 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:03:08 -0600 |
commit | c20b0658b386b2fdba4bc2306d876f0cf9d1d7ff (patch) | |
tree | 8f95b86386b84597b4df4c81c40f5c1c900bc8f2 /drivers/spi | |
parent | 8f33f14e8f44ebef9c1da1e8adb33c0f527c2681 (diff) |
MLK-11909-1 spi: spi-imx: Dereference null return value
Dereference null return value.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 03381b108313be9c347b58a795373491d9662f31)
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-imx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 00c50f274a4c..4d21b70dd39a 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007, 2015 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2007, 2016 Freescale Semiconductor, Inc. All Rights Reserved. * Copyright (C) 2008 Juergen Beisert * * This program is free software; you can redistribute it and/or @@ -209,7 +209,7 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi, { struct spi_imx_data *spi_imx = spi_master_get_devdata(master); - if (spi_imx->dma_is_inited && + if (transfer && spi_imx->dma_is_inited && (transfer->len > spi_imx_get_fifosize(spi_imx))) return true; return false; |