Fix checkpatch check: Comparison to NULL could be written "!master"

Signed-off-by: Jasminko Dedic <bete...@gmail.com>
---
 drivers/staging/mt7621-spi/spi-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 513b6e79b985..996defca341b 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -353,7 +353,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;
        }
-- 
2.17.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to