public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Kalyan Thota <kalyan_t@codeaurora.org>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Rob Clark <robdclark@chromium.org>
Subject: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
Date: Mon, 1 Mar 2021 09:58:36 +0300	[thread overview]
Message-ID: <20210301065836.GL2087@kadam> (raw)

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: 4259ff7ae509ed880b3a7bb685972c3a3bf4b74b drm/msm/dpu: add support for pcc color block in dpu driver
config: arm64-randconfig-m031-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)

vim +/ctx +31 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c

4259ff7ae509ed Kalyan Thota 2020-03-24  28  
4259ff7ae509ed Kalyan Thota 2020-03-24 @29  	u32 base = ctx->cap->sblk->pcc.base;
                                                           ^^^^^
Dereference

4259ff7ae509ed Kalyan Thota 2020-03-24  30  
4259ff7ae509ed Kalyan Thota 2020-03-24 @31  	if (!ctx || !base) {
                                                    ^^^^
Checked too late

4259ff7ae509ed Kalyan Thota 2020-03-24  32  		DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
4259ff7ae509ed Kalyan Thota 2020-03-24  33  		return;
4259ff7ae509ed Kalyan Thota 2020-03-24  34  	}

---
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: 33284 bytes --]

                 reply	other threads:[~2021-03-01  7:01 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=20210301065836.GL2087@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kalyan_t@codeaurora.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=robdclark@chromium.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