From: Aditya Pakki <pakki001@umn.edu> To: pakki001@umn.edu Cc: kjlu@umn.edu, "Gustavo A. R. Silva" <gustavoars@kernel.org>, Sam Ravnborg <sam@ravnborg.org>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order Date: Tue, 6 Apr 2021 18:35:17 -0500 [thread overview] Message-ID: <20210406233519.2205389-1-pakki001@umn.edu> (raw) The resource release in sm501fb_remove() is not in the inverse order of sm501fb_probe(), for the buffers. Release the info object after deallocating the buffers. Signed-off-by: Aditya Pakki <pakki001@umn.edu> --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 6a52eba64559..4c32c9e88850 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -2060,11 +2060,11 @@ static int sm501fb_remove(struct platform_device *pdev) unregister_framebuffer(fbinfo_pnl); sm501fb_stop(info); - kfree(info); framebuffer_release(fbinfo_pnl); framebuffer_release(fbinfo_crt); + kfree(info); return 0; } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Aditya Pakki <pakki001@umn.edu> To: pakki001@umn.edu Cc: linux-fbdev@vger.kernel.org, kjlu@umn.edu, "Gustavo A. R. Silva" <gustavoars@kernel.org>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org> Subject: [PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order Date: Tue, 6 Apr 2021 18:35:17 -0500 [thread overview] Message-ID: <20210406233519.2205389-1-pakki001@umn.edu> (raw) The resource release in sm501fb_remove() is not in the inverse order of sm501fb_probe(), for the buffers. Release the info object after deallocating the buffers. Signed-off-by: Aditya Pakki <pakki001@umn.edu> --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 6a52eba64559..4c32c9e88850 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -2060,11 +2060,11 @@ static int sm501fb_remove(struct platform_device *pdev) unregister_framebuffer(fbinfo_pnl); sm501fb_stop(info); - kfree(info); framebuffer_release(fbinfo_pnl); framebuffer_release(fbinfo_crt); + kfree(info); return 0; } -- 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-04-06 23:41 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-06 23:35 Aditya Pakki [this message] 2021-04-06 23:35 ` [PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order Aditya Pakki 2021-04-20 7:19 ` Greg KH 2021-04-20 7:19 ` Greg KH
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=20210406233519.2205389-1-pakki001@umn.edu \ --to=pakki001@umn.edu \ --cc=dri-devel@lists.freedesktop.org \ --cc=gustavoars@kernel.org \ --cc=kjlu@umn.edu \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sam@ravnborg.org \ /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: linkBe 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.