From: Tony Prisk <linux@prisktech.co.nz>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions
Date: Sun, 09 Dec 2012 10:21:53 +0000 [thread overview]
Message-ID: <1355048513.9812.7.camel@gitbox> (raw)
In-Reply-To: <alpine.DEB.2.02.1212090820270.2028@localhost6.localdomain6>
On Sun, 2012-12-09 at 08:21 +0100, Julia Lawall wrote:
> > Rather than the goto, add the fail path code in directly, and return.
> >
> >
> > ret = register_framebuffer(&fbi->fb);
> > if (ret < 0) {
> > dev_err(&pdev->dev,
> > "Failed to register framebuffer device: %d\n", ret);
> > if (fbi->fb.cmap.len)
> > fb_dealloc_cmap(&fbi->fb.cmap);
> > return ret;
> > }
>
> So there is no need for the platform_set_drvdata(pdev, NULL); ?
Unless there is some kind of reference counting, I can't see any reason
for this.
>
> Also, do you know if it is correct that the original code does not include
> a call to dma_free_coherent?
No, that is not correct - there definitely should be a
dma_free_coherent, both in the fail path and in the remove(). Appears
they are both missing.
Regards
Tony P
WARNING: multiple messages have this Message-ID (diff)
From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drivers/video/wm8505fb.c: use devm_ functions
Date: Sun, 09 Dec 2012 23:21:53 +1300 [thread overview]
Message-ID: <1355048513.9812.7.camel@gitbox> (raw)
In-Reply-To: <alpine.DEB.2.02.1212090820270.2028@localhost6.localdomain6>
On Sun, 2012-12-09 at 08:21 +0100, Julia Lawall wrote:
> > Rather than the goto, add the fail path code in directly, and return.
> >
> >
> > ret = register_framebuffer(&fbi->fb);
> > if (ret < 0) {
> > dev_err(&pdev->dev,
> > "Failed to register framebuffer device: %d\n", ret);
> > if (fbi->fb.cmap.len)
> > fb_dealloc_cmap(&fbi->fb.cmap);
> > return ret;
> > }
>
> So there is no need for the platform_set_drvdata(pdev, NULL); ?
Unless there is some kind of reference counting, I can't see any reason
for this.
>
> Also, do you know if it is correct that the original code does not include
> a call to dma_free_coherent?
No, that is not correct - there definitely should be a
dma_free_coherent, both in the fail path and in the remove(). Appears
they are both missing.
Regards
Tony P
WARNING: multiple messages have this Message-ID (diff)
From: Tony Prisk <linux@prisktech.co.nz>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: linux-fbdev@vger.kernel.org,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions
Date: Sun, 09 Dec 2012 23:21:53 +1300 [thread overview]
Message-ID: <1355048513.9812.7.camel@gitbox> (raw)
In-Reply-To: <alpine.DEB.2.02.1212090820270.2028@localhost6.localdomain6>
On Sun, 2012-12-09 at 08:21 +0100, Julia Lawall wrote:
> > Rather than the goto, add the fail path code in directly, and return.
> >
> >
> > ret = register_framebuffer(&fbi->fb);
> > if (ret < 0) {
> > dev_err(&pdev->dev,
> > "Failed to register framebuffer device: %d\n", ret);
> > if (fbi->fb.cmap.len)
> > fb_dealloc_cmap(&fbi->fb.cmap);
> > return ret;
> > }
>
> So there is no need for the platform_set_drvdata(pdev, NULL); ?
Unless there is some kind of reference counting, I can't see any reason
for this.
>
> Also, do you know if it is correct that the original code does not include
> a call to dma_free_coherent?
No, that is not correct - there definitely should be a
dma_free_coherent, both in the fail path and in the remove(). Appears
they are both missing.
Regards
Tony P
next prev parent reply other threads:[~2012-12-09 10:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-08 15:31 [PATCH] drivers/video/wm8505fb.c: use devm_ functions Julia Lawall
2012-12-08 16:31 ` Julia Lawall
2012-12-08 16:31 ` Julia Lawall
2012-12-08 15:31 ` Julia Lawall
2012-12-08 21:42 ` Tony Prisk
2012-12-08 21:42 ` Tony Prisk
2012-12-08 21:42 ` Tony Prisk
2012-12-09 7:21 ` Julia Lawall
2012-12-09 7:21 ` Julia Lawall
2012-12-09 7:21 ` Julia Lawall
2012-12-09 10:21 ` Tony Prisk [this message]
2012-12-09 10:21 ` Tony Prisk
2012-12-09 10:21 ` Tony Prisk
2012-12-09 17:08 ` Julia Lawall
2012-12-09 18:08 ` Julia Lawall
2012-12-09 18:08 ` Julia Lawall
2012-12-09 17:08 ` Julia Lawall
2012-12-09 23:44 ` [Bulk] " Tony Prisk
2012-12-09 23:44 ` Tony Prisk
2012-12-09 23:44 ` Tony Prisk
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=1355048513.9812.7.camel@gitbox \
--to=linux@prisktech.co.nz \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.