summaryrefslogtreecommitdiff
path: root/drivers/media/platform/atmel/atmel-isc.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-28 06:50:28 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 08:20:57 -0400
commitaf28c99628ebfbdc3fff3d92c7044d3a51b7ccea (patch)
treeff56a13fbd5ed6c2bb20a746464fd49fb0199c48 /drivers/media/platform/atmel/atmel-isc.c
parent2d3da59ff163b2aa805de0fc65ba933a735b00cd (diff)
media: drivers: Adjust checks for null pointers
The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/platform/atmel/atmel-isc.c')
-rw-r--r--drivers/media/platform/atmel/atmel-isc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index 755d2d4dd142..2f8e345d297e 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1590,7 +1590,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
spin_lock_init(&isc->dma_queue_lock);
sd_entity->config = v4l2_subdev_alloc_pad_config(sd_entity->sd);
- if (sd_entity->config == NULL)
+ if (!sd_entity->config)
return -ENOMEM;
ret = isc_formats_init(isc);
@@ -1714,7 +1714,7 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
subdev_entity = devm_kzalloc(dev,
sizeof(*subdev_entity), GFP_KERNEL);
- if (subdev_entity == NULL) {
+ if (!subdev_entity) {
of_node_put(rem);
ret = -ENOMEM;
break;
@@ -1722,7 +1722,7 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
subdev_entity->asd = devm_kzalloc(dev,
sizeof(*subdev_entity->asd), GFP_KERNEL);
- if (subdev_entity->asd == NULL) {
+ if (!subdev_entity->asd) {
of_node_put(rem);
ret = -ENOMEM;
break;