All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin van der Gracht <robin@protonic.nl>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev
Date: Wed, 8 Feb 2017 17:12:31 +0100	[thread overview]
Message-ID: <20170208171231.0e47a315@erd979> (raw)
In-Reply-To: <20170131205438.7531-1-dmitry.torokhov@gmail.com>

On Tue, 31 Jan 2017 12:54:36 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

> '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);
>  

Acked-by: Robin van der Gracht <robin@protonic.nl>

      parent reply	other threads:[~2017-02-08 16:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 20:54 [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov
2017-01-31 20:54 ` [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
2017-02-08 16:48   ` Robin van der Gracht
2017-02-09 18:10     ` Dmitry Torokhov
2017-01-31 20:54 ` [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov
2017-02-08 16:52   ` Robin van der Gracht
2017-02-07  7:45 ` [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht
2017-02-08 16:12 ` Robin van der Gracht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170208171231.0e47a315@erd979 \
    --to=robin@protonic.nl \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.