Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640817
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings |
| Date | 2017-05-13 02:50 +0200 |
| Message-ID | <tGtpU-4w9-3@gated-at.bofh.it> (permalink) |
| References | <tGkcW-62A-9@gated-at.bofh.it> <tGlC2-7aB-5@gated-at.bofh.it> <tGrHr-39Y-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 12 May 2017, Florian Fainelli wrote:
> On 05/12/2017 09:22 AM, David Miller wrote:
> > From: Julia Lawall <julia.lawall@lip6.fr>
> > Date: Fri, 12 May 2017 22:54:23 +0800 (SGT)
> >
> >> Device node iterators put the previous value of the index variable, so an
> >> explicit put causes a double put.
> > ...
> >> @@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev,
> >> if (r) {
> >> mdiobus_free(cb->mii_bus);
> >> devm_kfree(dev, cb);
> >> - of_node_put(child_bus_node);
> >> } else {
> >
> > I think we're instead simply missing a break; statement here.
>
> It's kind of questionable, if we have an error initializing one of our
> child MDIO bus controller (child from the perspective of the MDIO mux,
> boy this is getting complicated...), should we keep on going, or should
> we abort entirely and rollback what we have successfully registered?
>
> I don't think Julia's patch makes thing worse, in that if we had to
> rollback, we would not be doing this correctly now anyway.
Just to be clear, if you want the break instead, then you need to keep the
put.
julia
>
> Jon, what do you think?
> --
> Florian
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mdio: mux: fix device_node_continue.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2017-05-12 17:00 +0200
Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings David Miller <davem@davemloft.net> - 2017-05-12 18:30 +0200
Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings Florian Fainelli <f.fainelli@gmail.com> - 2017-05-13 01:00 +0200
Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2017-05-13 02:50 +0200
Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings Jon Mason <jon.mason@broadcom.com> - 2017-05-15 19:40 +0200
Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings David Miller <davem@davemloft.net> - 2017-05-15 20:30 +0200
csiph-web