Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1445260
| From | Martin Schwidefsky <schwidefsky@de.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] s390/pci: Delete an unnecessary check before the function call "pci_dev_put" |
| Date | 2016-07-18 09:10 +0200 |
| Message-ID | <rWaQG-352-27@gated-at.bofh.it> (permalink) |
| References | (13 earlier) <mSsDN-4wa-61@gated-at.bofh.it> <mSsDN-4wa-63@gated-at.bofh.it> <mSsDN-4wa-65@gated-at.bofh.it> <mSsDN-4wa-33@gated-at.bofh.it> <rVCP0-7iw-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 16 Jul 2016 20:40:23 +0200 SF Markus Elfring <elfring@users.sourceforge.net> wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Sat, 16 Jul 2016 20:15:17 +0200 > > The pci_dev_put() 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> > --- > arch/s390/pci/pci_event.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c > index fb2a9a5..c2b27ad 100644 > --- a/arch/s390/pci/pci_event.c > +++ b/arch/s390/pci/pci_event.c > @@ -145,8 +145,7 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) > default: > break; > } > - if (pdev) > - pci_dev_put(pdev); > + pci_dev_put(pdev); > } > > void zpci_event_availability(void *data) Applied, thanks. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] s390/pci: Delete an unnecessary check before the function call "pci_dev_put" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-16 20:50 +0200 Re: [PATCH] s390/pci: Delete an unnecessary check before the function call "pci_dev_put" Martin Schwidefsky <schwidefsky@de.ibm.com> - 2016-07-18 09:10 +0200
csiph-web