Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1371873 > unrolled thread

[PATCH 1/7] spi: cadence: Fix a check patch warning

Started byShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
First post2016-04-05 20:30 +0200
Last post2016-04-05 20:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/7] spi: cadence: Fix a check patch warning Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> - 2016-04-05 20:30 +0200

#1371873 — [PATCH 1/7] spi: cadence: Fix a check patch warning

FromShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Date2016-04-05 20:30 +0200
Subject[PATCH 1/7] spi: cadence: Fix a check patch warning
Message-ID<rkDAm-864-15@gated-at.bofh.it>
CHECK: Comparison to NULL could be written "!master"
+	if (master == NULL)

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
---
 drivers/spi/spi-cadence.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 121a413..3acaac3 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -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);
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web