All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] auxdisplay: ht16k33: do not try to free fbdev
@ 2017-02-09 18:15 Dmitry Torokhov
  2017-02-09 18:15 ` [PATCH v2 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
  2017-02-09 18:15 ` [PATCH v2 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-02-09 18:15 UTC (permalink / raw)
  To: Robin van der Gracht, Miguel Ojeda Sandonis
  Cc: linux-kernel, Greg Kroah-Hartman, Linus Walleij

'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
free it will cause troubles.

Acked-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

v2: added Robin's Ack

 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-10  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 18:15 [PATCH v2 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov
2017-02-09 18:15 ` [PATCH v2 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
2017-02-10  8:32   ` Robin van der Gracht
2017-02-09 18:15 ` [PATCH v2 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov

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.