summaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay/ht16k33.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-02-09 10:15:51 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-10 15:57:28 +0100
commitbbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0 (patch)
tree42c91a95109fb637bf6b2195381993ac5bd83f67 /drivers/auxdisplay/ht16k33.c
parent372b1e91343e657a7cc5e2e2bcecd5140ac28119 (diff)
downloadlinux-bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0.tar.gz
linux-bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0.tar.bz2
linux-bbd39d1e4ada551d0d7e7a39f97382fa24b5e7c0.zip
auxdisplay: ht16k33: do not try to free fbdev
'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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/auxdisplay/ht16k33.c')
-rw-r--r--drivers/auxdisplay/ht16k33.c4
1 files changed, 1 insertions, 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 @@ err_fbdev_info:
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);