Skip to content

Commit

Permalink
auxdisplay: ht16k33: do not try to free fbdev
Browse files Browse the repository at this point in the history
'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
free it will cause troubles.

Acked-by: Robin van der Gracht <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
dtor authored and gregkh committed Feb 10, 2017
1 parent 372b1e9 commit bbd39d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/auxdisplay/ht16k33.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit bbd39d1

Please sign in to comment.