]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
spi: cadence: Fix a check patch warning
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Tue, 5 Apr 2016 18:07:48 +0000 (23:37 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 5 Apr 2016 18:51:10 +0000 (11:51 -0700)
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>
drivers/spi/spi-cadence.c

index 121a4135b5401b4dbe025f822c927d0f4d1b2947..3acaac33218acae79ce6493d857ecfa2fa47fd5b 100644 (file)
@@ -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);