Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452326
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] s390/pci: Remove unnecessary if condition |
| Date | 2016-07-29 10:50 +0200 |
| Message-ID | <s0bEt-2gP-5@gated-at.bofh.it> (permalink) |
| References | <s0buO-2d6-21@gated-at.bofh.it> <s0buO-2d6-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 29 Jul 2016, Sebastian Ott wrote:
> On Fri, 29 Jul 2016, Amitoj Kaur Chawla wrote:
> > Remove unnecessary error handling because the only failure value that
> > can be returned is NULL and so the test can never be true.
> >
> > The Coccinelle semantic patch used to make this change is as follows:
> > @@
> > expression e;
> > @@
> >
> > e = debugfs_create_file(...);
> > - if(IS_ERR(e)) { e = NULL; }
>
> Nope. For !CONFIG_DEBUG_FS debugfs_create_file returns an ERR_PTR.
Clicking around in lxr doesn't show that, but perhaps an alternative
definition is overlooked?
julia
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] s390/pci: Remove unnecessary if condition Sebastian Ott <sebott@linux.vnet.ibm.com> - 2016-07-29 10:40 +0200
Re: [PATCH] s390/pci: Remove unnecessary if condition Julia Lawall <julia.lawall@lip6.fr> - 2016-07-29 10:50 +0200
Re: [PATCH] s390/pci: Remove unnecessary if condition Sebastian Ott <sebott@linux.vnet.ibm.com> - 2016-07-29 11:50 +0200
Re: [PATCH] s390/pci: Remove unnecessary if condition Julia Lawall <julia.lawall@lip6.fr> - 2016-08-01 08:40 +0200
csiph-web