From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: drm_fb_helper.c:1247:1-8: alloc with no test
Date: Fri, 17 Aug 2012 03:27:42 +0000 [thread overview]
Message-ID: <20120817032742.GB26867@localhost> (raw)
Hi Daniel,
FYI, here is a potential problem on memory allocation failure, caught by coccinelle:
+ drivers/gpu/drm/drm_fb_helper.c:1247:1-8: alloc with no test, possible model on line 1252
vim +1247 drivers/gpu/drm/drm_fb_helper.c
1244 sizeof(struct drm_fb_helper_crtc *), GFP_KERNEL);
1245 modes = kcalloc(dev->mode_config.num_connector,
1246 sizeof(struct drm_display_mode *), GFP_KERNEL);
> 1247 enabled = kcalloc(dev->mode_config.num_connector,
1248 sizeof(bool), GFP_KERNEL);
1249
1250 drm_enable_connectors(fb_helper, enabled);
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com> Intel Corporation
reply other threads:[~2012-08-17 3:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120817032742.GB26867@localhost \
--to=fengguang.wu@intel.com \
--cc=kernel-janitors@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).