From: Shubhrajyoti Datta Date: Tue, 5 Apr 2016 18:07:48 +0000 (+0530) Subject: spi: cadence: Fix a check patch warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15a1c5030a1e0445af2e4eaa1535cccc8519d99c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spi: cadence: Fix a check patch warning CHECK: Comparison to NULL could be written "!master" + if (master == NULL) Signed-off-by: Shubhrajyoti Datta Signed-off-by: Mark Brown --- 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) u32 num_cs; master = spi_alloc_master(&pdev->dev, sizeof(*xspi)); - if (master == NULL) + if (!master) return -ENOMEM; xspi = spi_master_get_devdata(master);