Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1445109 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-07-17 22:20 +0200 |
| Last post | 2016-07-22 12:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 22:20 +0200
Re: [PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device" khalasa@piap.pl (Krzysztof Hałasa) - 2016-07-22 12:30 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-07-17 22:20 +0200 |
| Subject | [PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device" |
| Message-ID | <rW0HE-5da-15@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 17 Jul 2016 22:00:35 +0200
The video_unregister_device() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/staging/media/tw686x-kh/tw686x-kh-video.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/tw686x-kh/tw686x-kh-video.c b/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
index 6ecb504..3f2830c 100644
--- a/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
+++ b/drivers/staging/media/tw686x-kh/tw686x-kh-video.c
@@ -643,8 +643,7 @@ void tw686x_kh_video_free(struct tw686x_dev *dev)
struct tw686x_video_channel *vc = &dev->video_channels[ch];
v4l2_ctrl_handler_free(&vc->ctrl_handler);
- if (vc->device)
- video_unregister_device(vc->device);
+ video_unregister_device(vc->device);
vb2_dma_sg_cleanup_ctx(vc->alloc_ctx);
for (n = 0; n < 2; n++) {
struct dma_desc *descs = &vc->sg_tables[n];
--
2.9.1
[toc] | [next] | [standalone]
| From | khalasa@piap.pl (Krzysztof Hałasa) |
|---|---|
| Date | 2016-07-22 12:30 +0200 |
| Subject | Re: [PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device" |
| Message-ID | <rXFSq-4xq-29@gated-at.bofh.it> |
| In reply to | #1445109 |
SF Markus Elfring <elfring@users.sourceforge.net> writes: > The video_unregister_device() function tests whether its argument is NULL > and then returns immediately. Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/staging/media/tw686x-kh/tw686x-kh-video.c | 3 +-- Thanks. -- Krzysztof Halasa Industrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web