From 7586170c84de561c7bf05dd0df0c4bf9786417d5 Mon Sep 17 00:00:00 2001 From: Eva Rachel Retuya Date: Sat, 27 Feb 2016 20:39:24 +0800 Subject: staging: rts5208: simplify NULL tests Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rts5208/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rts5208/spi.c') diff --git a/drivers/staging/rts5208/spi.c b/drivers/staging/rts5208/spi.c index 2e1e6cb6b070..26eb2a184f91 100644 --- a/drivers/staging/rts5208/spi.c +++ b/drivers/staging/rts5208/spi.c @@ -662,7 +662,7 @@ int spi_read_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip) } buf = kmalloc(SF_PAGE_LEN, GFP_KERNEL); - if (buf == NULL) { + if (!buf) { rtsx_trace(chip); return STATUS_ERROR; } -- cgit v1.2.3