Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571076
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev |
| Date | 2017-01-31 22:00 +0100 |
| Message-ID | <t5NGV-5im-13@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
free it will cause troubles.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Note that the patches have not been tried on a real hardware.
I am pretty confident in #1 and #3, but #2 is larger and it would be great
if someone with hardware tried running it before it gets applied.
Thanks!
drivers/auxdisplay/ht16k33.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index eeb323f56c07..f2f304b3f061 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -378,7 +378,7 @@ static int ht16k33_probe(struct i2c_client *client,
fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
if (!fbdev->buffer) {
err = -ENOMEM;
- goto err_free_fbdev;
+ goto err_destroy_wq;
}
fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL);
@@ -510,8 +510,6 @@ static int ht16k33_probe(struct i2c_client *client,
framebuffer_release(fbdev->info);
err_fbdev_buffer:
free_page((unsigned long) fbdev->buffer);
-err_free_fbdev:
- kfree(fbdev);
err_destroy_wq:
destroy_workqueue(priv->workqueue);
--
2.11.0.483.g087da7b7c-goog
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
[PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Robin van der Gracht <robin@protonic.nl> - 2017-02-08 17:50 +0100
Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-09 19:20 +0100
[PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
Re: [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Robin van der Gracht <robin@protonic.nl> - 2017-02-08 18:30 +0100
Re: [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht <robin@protonic.nl> - 2017-02-07 09:20 +0100
Re: [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht <robin@protonic.nl> - 2017-02-08 17:50 +0100
csiph-web