staging: mt7621-spi: Clean up comparison to NULL
authorJasminko Dedic <betelge@gmail.com>
Sun, 3 Feb 2019 19:44:42 +0000 (02:44 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2019 11:34:37 +0000 (12:34 +0100)
Fix checkpatch check: Comparison to NULL could be written "!master"

Signed-off-by: Jasminko Dedic <betelge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-spi/spi-mt7621.c

index 167d0f0..b509f9f 100644 (file)
@@ -355,7 +355,7 @@ static int mt7621_spi_probe(struct platform_device *pdev)
                return status;
 
        master = spi_alloc_master(&pdev->dev, sizeof(*rs));
-       if (master == NULL) {
+       if (!master) {
                dev_info(&pdev->dev, "master allocation failed\n");
                return -ENOMEM;
        }