summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorSimon Sandström <simon@nikanor.nu>2019-07-04 08:08:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-04 10:40:44 +0200
commit209ff937b0d4d70bb054890a8c1722cec3fc70fe (patch)
tree5b93879631da526acf445d184c879dc30e70b54b /drivers/staging
parent5b2736ce361989882636d4b105d1146ca3382f47 (diff)
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/kpc2000/kpc2000_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 009dec2f4641..35ac1d7070b3 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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;