Message ID | 20180412122849.15329-1-stefan@osg.samsung.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
ACK-by: Xue Liu <liuxuenetmail@gmail.com> On 12 April 2018 at 14:28, Stefan Schmidt <stefan@osg.samsung.com> wrote: > We already allocated the device and platform data at this > point. Instead of simply return from the probe function we > need to cleanup the resources first. > > Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> > --- > drivers/net/ieee802154/mcr20a.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c > index 944470d69ba9..de0d7f28a181 100644 > --- a/drivers/net/ieee802154/mcr20a.c > +++ b/drivers/net/ieee802154/mcr20a.c > @@ -1309,8 +1309,10 @@ mcr20a_probe(struct spi_device *spi) > /* init buf */ > lp->buf = devm_kzalloc(&spi->dev, SPI_COMMAND_BUFFER, GFP_KERNEL); > > - if (!lp->buf) > - return -ENOMEM; > + if (!lp->buf) { > + ret = -ENOMEM; > + goto free_dev; > + } > > mcr20a_setup_tx_spi_messages(lp); > mcr20a_setup_rx_spi_messages(lp); > -- > 2.14.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Xue.
On 04/12/2018 02:38 PM, Xue Liu wrote:
> ACK-by: Xue Liu <liuxuenetmail@gmail.com>
Same as with your last ACK thsi is the wrong format.
I explained in the last mail the details. Please have nother read and send a correct Acked-By
line so patchwork can pick it up and it will be present in the commit when I test and push it.
regards
Stefan Schmidt
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Stefan, Thanks for the reminder. I will send a new one. Regards, Xue Liu On 12 April 2018 at 15:23, Stefan Schmidt <stefan@osg.samsung.com> wrote: > Hello Xue. > > > On 04/12/2018 02:38 PM, Xue Liu wrote: >> ACK-by: Xue Liu <liuxuenetmail@gmail.com> > > Same as with your last ACK thsi is the wrong format. > > I explained in the last mail the details. Please have nother read and send a correct Acked-By > > line so patchwork can pick it up and it will be present in the commit when I test and push it. > > > regards > Stefan Schmidt -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Acked-by: Xue Liu <liuxuenetmail@gmail.com> On 12 April 2018 at 14:28, Stefan Schmidt <stefan@osg.samsung.com> wrote: > We already allocated the device and platform data at this > point. Instead of simply return from the probe function we > need to cleanup the resources first. > > Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> > --- > drivers/net/ieee802154/mcr20a.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c > index 944470d69ba9..de0d7f28a181 100644 > --- a/drivers/net/ieee802154/mcr20a.c > +++ b/drivers/net/ieee802154/mcr20a.c > @@ -1309,8 +1309,10 @@ mcr20a_probe(struct spi_device *spi) > /* init buf */ > lp->buf = devm_kzalloc(&spi->dev, SPI_COMMAND_BUFFER, GFP_KERNEL); > > - if (!lp->buf) > - return -ENOMEM; > + if (!lp->buf) { > + ret = -ENOMEM; > + goto free_dev; > + } > > mcr20a_setup_tx_spi_messages(lp); > mcr20a_setup_rx_spi_messages(lp); > -- > 2.14.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 04/12/2018 03:28 PM, Xue Liu wrote: > Acked-by: Xue Liu <liuxuenetmail@gmail.com> Thanks for the review, Xue. > > On 12 April 2018 at 14:28, Stefan Schmidt <stefan@osg.samsung.com> wrote: >> We already allocated the device and platform data at this >> point. Instead of simply return from the probe function we >> need to cleanup the resources first. >> >> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> >> --- >> drivers/net/ieee802154/mcr20a.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c >> index 944470d69ba9..de0d7f28a181 100644 >> --- a/drivers/net/ieee802154/mcr20a.c >> +++ b/drivers/net/ieee802154/mcr20a.c >> @@ -1309,8 +1309,10 @@ mcr20a_probe(struct spi_device *spi) >> /* init buf */ >> lp->buf = devm_kzalloc(&spi->dev, SPI_COMMAND_BUFFER, GFP_KERNEL); >> >> - if (!lp->buf) >> - return -ENOMEM; >> + if (!lp->buf) { >> + ret = -ENOMEM; >> + goto free_dev; >> + } >> >> mcr20a_setup_tx_spi_messages(lp); >> mcr20a_setup_rx_spi_messages(lp); >> -- >> 2.14.3 >> This patch has been applied to the wpan tree and will be part of the next pull request to net. regards Stefan Schmidt -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c index 944470d69ba9..de0d7f28a181 100644 --- a/drivers/net/ieee802154/mcr20a.c +++ b/drivers/net/ieee802154/mcr20a.c @@ -1309,8 +1309,10 @@ mcr20a_probe(struct spi_device *spi) /* init buf */ lp->buf = devm_kzalloc(&spi->dev, SPI_COMMAND_BUFFER, GFP_KERNEL); - if (!lp->buf) - return -ENOMEM; + if (!lp->buf) { + ret = -ENOMEM; + goto free_dev; + } mcr20a_setup_tx_spi_messages(lp); mcr20a_setup_rx_spi_messages(lp);
We already allocated the device and platform data at this point. Instead of simply return from the probe function we need to cleanup the resources first. Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> --- drivers/net/ieee802154/mcr20a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)