Skip to content

Commit

Permalink
spi: cadence: Fix a check patch warning
Browse files Browse the repository at this point in the history
CHECK: Comparison to NULL could be written "!master"
+	if (master == NULL)

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Shubhrajyoti Datta authored and Mark Brown committed Apr 5, 2016
1 parent f55532a commit 15a1c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-cadence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 15a1c50

Please sign in to comment.