From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: kbuild test robot <lkp@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kbuild-all@01.org
Subject: Re: [drm-intel:drm-intel-next-queued 6/7] drivers/gpu/drm/i915/display/intel_color.c:1576 ilk_read_lut_10() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
Date: Fri, 20 Sep 2019 21:13:18 +0300 [thread overview]
Message-ID: <20190920181318.GF1208@intel.com> (raw)
In-Reply-To: <201909210114.iKWrswyk%lkp@intel.com>
On Sat, Sep 21, 2019 at 01:55:25AM +0800, kbuild test robot wrote:
> tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
> head: 4bb6a9d5d9a8289673c4cb0786d44be8a63c21db
> commit: 6b97b118d4d542c7bc25b725c6de3947fffb921b [6/7] drm/i915/display: Extract ilk_read_luts()
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> New smatch warnings:
> drivers/gpu/drm/i915/display/intel_color.c:1576 ilk_read_lut_10() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
It never returns null. Not sure why this thing thinks otherwise.
>
> Old smatch warnings:
> drivers/gpu/drm/i915/display/intel_color.c:1535 i9xx_read_lut_8() error: potential null dereference 'blob'. (drm_property_create_blob returns null)
>
> vim +/blob +1576 drivers/gpu/drm/i915/display/intel_color.c
>
> 1558
> 1559 static struct drm_property_blob *
> 1560 ilk_read_lut_10(const struct intel_crtc_state *crtc_state)
> 1561 {
> 1562 struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
> 1563 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> 1564 u32 lut_size = INTEL_INFO(dev_priv)->color.gamma_lut_size;
> 1565 enum pipe pipe = crtc->pipe;
> 1566 struct drm_property_blob *blob;
> 1567 struct drm_color_lut *blob_data;
> 1568 u32 i, val;
> 1569
> 1570 blob = drm_property_create_blob(&dev_priv->drm,
> 1571 sizeof(struct drm_color_lut) * lut_size,
> 1572 NULL);
> 1573 if (IS_ERR(blob))
> 1574 return NULL;
> 1575
> > 1576 blob_data = blob->data;
> 1577
> 1578 for (i = 0; i < lut_size; i++) {
> 1579 val = I915_READ(PREC_PALETTE(pipe, i));
> 1580
> 1581 blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(
> 1582 PREC_PALETTE_RED_MASK, val), 10);
> 1583 blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(
> 1584 PREC_PALETTE_GREEN_MASK, val), 10);
> 1585 blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(
> 1586 PREC_PALETTE_BLUE_MASK, val), 10);
> 1587 }
> 1588
> 1589 return blob;
> 1590 }
> 1591
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2019-09-20 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 17:55 [drm-intel:drm-intel-next-queued 6/7] drivers/gpu/drm/i915/display/intel_color.c:1576 ilk_read_lut_10() error: potential null dereference 'blob'. (drm_property_create_blob returns null) kbuild test robot
2019-09-20 18:13 ` Ville Syrjälä [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=20190920181318.GF1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=kbuild-all@01.org \
--cc=lkp@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 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.