Commit bbd39d1e authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

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: default avatarRobin van der Gracht <robin@protonic.nl>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 372b1e91
...@@ -378,7 +378,7 @@ static int ht16k33_probe(struct i2c_client *client, ...@@ -378,7 +378,7 @@ static int ht16k33_probe(struct i2c_client *client,
fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL); fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
if (!fbdev->buffer) { if (!fbdev->buffer) {
err = -ENOMEM; err = -ENOMEM;
goto err_free_fbdev; goto err_destroy_wq;
} }
fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL); fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL);
...@@ -510,8 +510,6 @@ static int ht16k33_probe(struct i2c_client *client, ...@@ -510,8 +510,6 @@ static int ht16k33_probe(struct i2c_client *client,
framebuffer_release(fbdev->info); framebuffer_release(fbdev->info);
err_fbdev_buffer: err_fbdev_buffer:
free_page((unsigned long) fbdev->buffer); free_page((unsigned long) fbdev->buffer);
err_free_fbdev:
kfree(fbdev);
err_destroy_wq: err_destroy_wq:
destroy_workqueue(priv->workqueue); destroy_workqueue(priv->workqueue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment