mirror of https://gitee.com/openkylin/linux.git
staging: kpc2000: simplify comparison to NULL in kpc2000_spi.c
Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström <simon@nikanor.nu> Link: https://lore.kernel.org/r/20190704060811.10330-2-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5b2736ce36
commit
209ff937b0
|
@ -436,7 +436,7 @@ kp_spi_probe(struct platform_device *pldev)
|
|||
}
|
||||
|
||||
master = spi_alloc_master(&pldev->dev, sizeof(struct kp_spi));
|
||||
if (master == NULL) {
|
||||
if (!master) {
|
||||
dev_err(&pldev->dev, "%s: master allocation failed\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
|
@ -460,7 +460,7 @@ kp_spi_probe(struct platform_device *pldev)
|
|||
master->bus_num = pldev->id;
|
||||
|
||||
r = platform_get_resource(pldev, IORESOURCE_MEM, 0);
|
||||
if (r == NULL) {
|
||||
if (!r) {
|
||||
dev_err(&pldev->dev, "%s: Unable to get platform resources\n",
|
||||
__func__);
|
||||
status = -ENODEV;
|
||||
|
|
Loading…
Reference in New Issue