From: kbuild test robot <lkp@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Swati Sharma <swati2.sharma@intel.com>
Subject: drivers/gpu/drm/i915/display/intel_color.c:1840 ilk_read_lut_8() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
Date: Sun, 24 May 2020 10:51:22 +0800 [thread overview]
Message-ID: <202005241017.Hi1aTMWU%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: caffb99b6929f41a69edbb5aef3a359bf45f3315
commit: 100882673ab83b55ea0e9ed3ad301125d36039a3 drm/i915: Split i9xx_read_lut_8() to gmch vs. ilk variants
date: 3 months ago
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 100882673ab83b55ea0e9ed3ad301125d36039a3
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
New smatch warnings:
drivers/gpu/drm/i915/display/intel_color.c:1840 ilk_read_lut_8() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
Old smatch warnings:
drivers/gpu/drm/i915/display/intel_color.c:1706 i9xx_read_lut_8() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
drivers/gpu/drm/i915/display/intel_color.c:1747 i965_read_lut_10p6() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
drivers/gpu/drm/i915/display/intel_color.c:1799 chv_read_cgm_lut() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
drivers/gpu/drm/i915/display/intel_color.c:1873 ilk_read_lut_10() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
drivers/gpu/drm/i915/display/intel_color.c:1920 glk_read_lut_10() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
vim +/blob +1840 drivers/gpu/drm/i915/display/intel_color.c
1823
1824 static struct drm_property_blob *
1825 ilk_read_lut_8(const struct intel_crtc_state *crtc_state)
1826 {
1827 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1828 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1829 enum pipe pipe = crtc->pipe;
1830 struct drm_property_blob *blob;
1831 struct drm_color_lut *blob_data;
1832 u32 i, val;
1833
1834 blob = drm_property_create_blob(&dev_priv->drm,
1835 sizeof(struct drm_color_lut) * LEGACY_LUT_LENGTH,
1836 NULL);
1837 if (IS_ERR(blob))
1838 return NULL;
1839
> 1840 blob_data = blob->data;
1841
1842 for (i = 0; i < LEGACY_LUT_LENGTH; i++) {
1843 val = intel_de_read(dev_priv, LGC_PALETTE(pipe, i));
1844
1845 blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(
1846 LGC_PALETTE_RED_MASK, val), 8);
1847 blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(
1848 LGC_PALETTE_GREEN_MASK, val), 8);
1849 blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(
1850 LGC_PALETTE_BLUE_MASK, val), 8);
1851 }
1852
1853 return blob;
1854 }
1855
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71667 bytes --]
reply other threads:[~2020-05-24 3:40 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=202005241017.Hi1aTMWU%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swati2.sharma@intel.com \
--cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox