Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1726250
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/6] [media] atmel-isc: Adjust three checks for null pointers |
| Date | 2017-09-04 22:10 +0200 |
| Message-ID | <um5R0-1xP-17@gated-at.bofh.it> (permalink) |
| References | <um5R0-1xP-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 4 Sep 2017 20:54:20 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
---
drivers/media/platform/atmel/atmel-isc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index f16bab0105c2..b6048cedb6cc 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;
--
2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] [media] Atmel: Adjustments for seven function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
[PATCH 1/6] [media] atmel-isc: Delete an error message for a failed memory allocation in isc_formats_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
[PATCH 3/6] [media] atmel-isc: Adjust three checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
[PATCH 4/6] [media] atmel-isi: Delete an error message for a failed memory allocation in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
[PATCH 5/6] [media] atmel-isi: Improve three size determinations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
[PATCH 6/6] [media] atmel-isi: Adjust a null pointer check in three functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
Re: [PATCH 0/6] [media] Atmel: Adjustments for seven function implementations "Yang, Wenyou" <Wenyou.Yang@Microchip.com> - 2017-09-06 03:00 +0200
Re: [PATCH 0/6] [media] Atmel: Adjustments for seven function implementations Ludovic Desroches <ludovic.desroches@microchip.com> - 2017-09-06 08:10 +0200
csiph-web