mirror of https://gitee.com/openkylin/linux.git
spi: cadence: Fix a check patch warning
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>
This commit is contained in:
parent
f55532a0c0
commit
15a1c5030a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue