From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 1/3] sm501fb: deallocate colormap only if allocated
Date: Sat, 4 Nov 2017 21:24:19 +0000 [thread overview]
Message-ID: <1509830661-7384-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
There are cases when panel and crt both are not defined and only one of
them is defined and initialized. In such cases, while removing the
device deallocate the colormap only if that particular fb is defined.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
drivers/video/fbdev/sm501fb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index 076dd27..381475f 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -1889,6 +1889,9 @@ static void sm501_free_init_fb(struct sm501fb_info *info,
{
struct fb_info *fbi = info->fb[head];
+ if (!fbi)
+ return;
+
fb_dealloc_cmap(&fbi->cmap);
}
--
2.1.4
next reply other threads:[~2017-11-04 21:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171104212429epcas1p428cc1efb505e9c78dda41e603c400b7b@epcas1p4.samsung.com>
2017-11-04 21:24 ` Sudip Mukherjee [this message]
2017-11-04 21:24 ` [PATCH 2/3] sm501fb: unregister framebuffer only if registered Sudip Mukherjee
2017-11-09 15:10 ` Bartlomiej Zolnierkiewicz
2017-11-04 21:24 ` [PATCH 3/3] sm501fb: suspend and resume fb if it exists Sudip Mukherjee
2017-11-09 15:11 ` Bartlomiej Zolnierkiewicz
2017-11-09 15:10 ` [PATCH 1/3] sm501fb: deallocate colormap only if allocated Bartlomiej Zolnierkiewicz
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=1509830661-7384-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).