From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
linux-media@vger.kernel.org,
linux1394-devel@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH 1/1] [media] firewire: Deletion of an unnecessary check before the function call "dvb_unregister_device"
Date: Thu, 20 Nov 2014 15:41:48 +0100 [thread overview]
Message-ID: <20141120154148.724ab462@kant> (raw)
In-Reply-To: <546DBA8E.6080401@users.sourceforge.net>
On Nov 20 SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Nov 2014 10:49:07 +0100
>
> The dvb_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>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
> ---
> drivers/media/firewire/firedtv-ci.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/firewire/firedtv-ci.c b/drivers/media/firewire/firedtv-ci.c
> index e5ebdbf..e63f582 100644
> --- a/drivers/media/firewire/firedtv-ci.c
> +++ b/drivers/media/firewire/firedtv-ci.c
> @@ -253,6 +253,5 @@ int fdtv_ca_register(struct firedtv *fdtv)
>
> void fdtv_ca_release(struct firedtv *fdtv)
> {
> - if (fdtv->cadev)
> - dvb_unregister_device(fdtv->cadev);
> + dvb_unregister_device(fdtv->cadev);
> }
--
Stefan Richter
-=====-====- =-== =-=--
http://arcgraph.de/sr/
next prev parent reply other threads:[~2014-11-20 14:42 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5307CAA2.8060406@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402212321410.2043@localhost6.localdomain6>
[not found] ` <530A086E.8010901@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402231635510.1985@localhost6.localdomain6>
[not found] ` <530A72AA.3000601@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402240658210.2090@localhost6.localdomain6>
[not found] ` <530B5FB6.6010207@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402241710370.2074@hadrien>
[not found] ` <530C5E18.1020800@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402251014170.2080@hadrien>
[not found] ` <530CD2C4.4050903@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402251840450.7035@hadrien>
[not found] ` <530CF8FF.8080600@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402252117150.2047@localhost6.localdomain6>
[not found] ` <530DD06F.4090703@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402262129250.2221@localhost6.localdomain6>
[not found] ` <5317A59D.4@users.sourceforge.net>
2014-11-20 8:19 ` [PATCH 0/3] [media] DVB-frontends: Deletion of a few unnecessary checks SF Markus Elfring
2014-11-20 8:29 ` [PATCH 2/3] [media] m88ds3103: One function call less in m88ds3103_init() after error detection SF Markus Elfring
2014-11-20 8:33 ` [PATCH 1/3] [media] DVB-frontends: Deletion of unnecessary checks before the function call "release_firmware" SF Markus Elfring
2014-11-20 8:39 ` [PATCH 3/3] [media] si2168: One function call less in si2168_init() after error detection SF Markus Elfring
2014-11-20 9:55 ` [PATCH 1/1] [media] firewire: Deletion of an unnecessary check before the function call "dvb_unregister_device" SF Markus Elfring
2014-11-20 14:41 ` Stefan Richter [this message]
2014-11-20 10:20 ` [PATCH 1/1] [media] i2c: Deletion of an unnecessary check before the function call "rc_unregister_device" SF Markus Elfring
2014-11-20 10:50 ` [PATCH 1/1] [media] platform: Deletion of unnecessary checks before two function calls SF Markus Elfring
2014-11-20 12:08 ` [PATCH 1/1] [media] rc: " SF Markus Elfring
2014-11-20 12:33 ` [PATCH 1/1] [media] USB: Deletion of unnecessary checks before three " SF Markus Elfring
2014-11-24 21:40 ` [PATCH 1/1] [media] Siano: Deletion of an unnecessary check before the function call "rc_unregister_device" SF Markus Elfring
2014-11-30 20:21 ` [PATCH 0/2] [media] tuners: Deletion of two unnecessary checks SF Markus Elfring
2014-11-30 20:25 ` [PATCH 1/2] [media] tuners: Deletion of unnecessary checks before the function call "release_firmware" SF Markus Elfring
2014-11-30 20:28 ` [PATCH 2/2] [media] tuners-si2157: One function call less in si2157_init() after error detection SF Markus Elfring
2014-11-30 21:55 ` [PATCH 1/1] [media] ddbridge: Deletion of an unnecessary check before the function call "dvb_unregister_device" SF Markus Elfring
2014-11-30 22:23 ` [PATCH 1/1] [media] V4L2: Deletion of an unnecessary check before the function call "vb2_put_vma" SF Markus Elfring
2014-12-01 9:46 ` Marek Szyprowski
2014-12-01 18:55 ` [PATCH 1/1] [media] lirc_zilog: Deletion of unnecessary checks before the function call "vfree" SF Markus Elfring
2014-12-01 22:30 ` [PATCH 0/2] [media] mn88473: Delete an unnecessary check SF Markus Elfring
2014-12-01 22:33 ` [PATCH 1/2] [media] mn88473: Deletion of an unnecessary check before the function call "release_firmware" SF Markus Elfring
2014-12-01 22:35 ` [PATCH 2/2] [media] mn88473: One function call less in mn88473_init() after error detection SF Markus Elfring
2015-02-01 19:11 ` [PATCH 0/2] [media] mn88472: Delete an unnecessary check SF Markus Elfring
2015-02-01 19:16 ` [PATCH 1/2] [media] mn88472: Deletion of an unnecessary check before the function call "release_firmware" SF Markus Elfring
2015-02-01 19:18 ` [PATCH 2/2] [media] mn88472: One function call less in mn88472_init() after error detection SF Markus Elfring
2015-02-02 12:44 ` [media] staging: bcm2048: Delete an unnecessary check before the function call "video_unregister_device" SF Markus Elfring
2015-02-03 14:10 ` [PATCH] [media] sp2: Delete an unnecessary check before the function call "kfree" SF Markus Elfring
2015-02-03 14:31 ` [PATCH] [media] V4L2: Delete an unnecessary check before the function call "media_entity_put" SF Markus Elfring
2015-02-03 16:18 ` [PATCH 0/2] DVB: Deletion of a few unnecessary checks SF Markus Elfring
2015-02-03 16:22 ` [PATCH 1/2] [media] DVB: Delete an unnecessary check before the function call "dvb_unregister_device" SF Markus Elfring
2015-02-03 16:23 ` [PATCH 2/2] [media] DVB: Less function calls in dvb_ca_en50221_init() after error detection SF Markus Elfring
2015-02-03 17:45 ` [PATCH] [media] stk-webcam: Delete an unnecessary check before the function call "vfree" SF Markus Elfring
2015-02-03 18:03 ` [PATCH] [media] au0828: Delete unnecessary checks before the function call "video_unregister_device" SF Markus Elfring
2015-11-05 18:45 ` [PATCH 0/2] [media] c8sectpfe: Deletion of a few unnecessary checks SF Markus Elfring
2015-11-05 18:49 ` [PATCH 1/2] [media] c8sectpfe: Delete unnecessary checks before two function calls SF Markus Elfring
2015-11-05 18:50 ` [PATCH 2/2] [media] c8sectpfe: Combine three checks into a single if block SF Markus Elfring
2015-11-06 10:09 ` walter harms
2015-11-06 7:50 ` [PATCH 0/2] [media] c8sectpfe: Deletion of a few unnecessary checks Maxime Coquelin
2016-07-17 20:16 ` [PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device" SF Markus Elfring
2016-07-22 10:16 ` Krzysztof Hałasa
2016-07-17 21:00 ` [PATCH] [media] cec: Delete an unnecessary check before the function call "rc_free_device" SF Markus Elfring
2016-07-19 18:02 ` [PATCH] [media] v4l2-common: Delete an unnecessary check before the function call "spi_unregister_device" SF Markus Elfring
2016-07-19 18:36 ` walter harms
2016-07-19 19:35 ` [PATCH] [media] tw686x: Delete an unnecessary check before the function call "video_unregister_device" SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141120154148.724ab462@kant \
--to=stefanr@s5r6.in-berlin.de \
--cc=elfring@users.sourceforge.net \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=m.chehab@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).