From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [skeggsb:00.01-disp 126/130] drivers/gpu/drm/nouveau/nouveau_dp.c:222 nouveau_dp_irq() warn: variable dereferenced before check 'outp' (see line 217)
Date: Tue, 09 Mar 2021 08:48:46 +0300 [thread overview]
Message-ID: <20210309054846.GH2087@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]
tree: https://github.com/skeggsb/linux 00.01-disp
head: 7548db689355586b323cda41f8a429b02e27a63f
commit: a7186a377ff320f522afe73ebe616a3d7b7cd297 [126/130] drm/nouveau/disp: expose conn event class
config: i386-randconfig-m021-20210304 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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/nouveau/nouveau_dp.c:222 nouveau_dp_irq() warn: variable dereferenced before check 'outp' (see line 217)
vim +/outp +222 drivers/gpu/drm/nouveau/nouveau_dp.c
a7186a377ff320 Ben Skeggs 2021-03-02 210 void
a7186a377ff320 Ben Skeggs 2021-03-02 211 nouveau_dp_irq(struct work_struct *work)
a0922278f83eae Lyude Paul 2020-08-26 212 {
a7186a377ff320 Ben Skeggs 2021-03-02 213 struct nouveau_connector *nv_connector =
a7186a377ff320 Ben Skeggs 2021-03-02 214 container_of(work, typeof(*nv_connector), irq_work);
a0922278f83eae Lyude Paul 2020-08-26 215 struct drm_connector *connector = &nv_connector->base;
a0922278f83eae Lyude Paul 2020-08-26 216 struct nouveau_encoder *outp = find_encoder(connector, DCB_OUTPUT_DP);
a7186a377ff320 Ben Skeggs 2021-03-02 @217 struct nouveau_drm *drm = nouveau_drm(outp->base.base.dev);
^^^^^^^^^^^^^^^^^^^
Dereference
a0922278f83eae Lyude Paul 2020-08-26 218 struct nv50_mstm *mstm;
2a8d9e79efec0f Ben Skeggs 2021-03-02 219 u64 hpd = 0;
a4efad354cf1b9 Lyude Paul 2020-08-26 220 int ret;
a0922278f83eae Lyude Paul 2020-08-26 221
a0922278f83eae Lyude Paul 2020-08-26 @222 if (!outp)
^^^^^
Checked too late.
a0922278f83eae Lyude Paul 2020-08-26 223 return;
a0922278f83eae Lyude Paul 2020-08-26 224
a0922278f83eae Lyude Paul 2020-08-26 225 mstm = outp->dp.mstm;
a0922278f83eae Lyude Paul 2020-08-26 226 NV_DEBUG(drm, "service %s\n", connector->name);
a0922278f83eae Lyude Paul 2020-08-26 227
a0922278f83eae Lyude Paul 2020-08-26 228 mutex_lock(&outp->dp.hpd_irq_lock);
a0922278f83eae Lyude Paul 2020-08-26 229
a0922278f83eae Lyude Paul 2020-08-26 230 if (mstm && mstm->is_mst) {
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32800 bytes --]
next reply other threads:[~2021-03-09 5:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 5:48 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-05 1:05 [skeggsb:00.01-disp 126/130] drivers/gpu/drm/nouveau/nouveau_dp.c:222 nouveau_dp_irq() warn: variable dereferenced before check 'outp' (see line 217) kernel test robot
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=20210309054846.GH2087@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.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 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.