diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2016-04-05 14:07:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-05 14:51:10 -0400 |
commit | 15a1c5030a1e0445af2e4eaa1535cccc8519d99c (patch) | |
tree | 3865652127833760a0dc029461c4368a35051599 | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) |
spi: cadence: Fix a check patch warning
CHECK: Comparison to NULL could be written "!master"
+ if (master == NULL)
Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-cadence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index 121a4135b540..3acaac33218a 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c | |||
@@ -481,7 +481,7 @@ static int cdns_spi_probe(struct platform_device *pdev) | |||
481 | u32 num_cs; | 481 | u32 num_cs; |
482 | 482 | ||
483 | master = spi_alloc_master(&pdev->dev, sizeof(*xspi)); | 483 | master = spi_alloc_master(&pdev->dev, sizeof(*xspi)); |
484 | if (master == NULL) | 484 | if (!master) |
485 | return -ENOMEM; | 485 | return -ENOMEM; |
486 | 486 | ||
487 | xspi = spi_master_get_devdata(master); | 487 | xspi = spi_master_get_devdata(master); |