[PATCH] staging: mt7621-spi: Clean up comparison to NULL

Jasminko Dedic betelge at gmail.com
Sun Feb 3 19:44:42 UTC 2019


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

Signed-off-by: Jasminko Dedic <betelge at 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



More information about the devel mailing list