From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsanka@codeaurora.org
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [bug report] drm/msm: Add SDM845 DPU support
Date: Fri, 1 Oct 2021 16:49:12 +0300 [thread overview]
Message-ID: <20211001134912.GA9248@kili> (raw)
Hello Jeykumar Sankaran,
This is a semi-automatic email about new static checker warnings.
The patch 25fdd5933e4c: "drm/msm: Add SDM845 DPU support" from Jun
27, 2018, leads to the following Smatch complaint:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:422 _dpu_hw_sspp_setup_scaler3()
warn: variable dereferenced before check 'ctx->cap->sblk' (see line 421)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
420 (void)pe;
^^^^^^^^^
You should file a bug report with your compiler devs instead of adding
these sorts of statements to your code. This function is used as a
function pointer so unused parameters are normal.
421 if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx) || !sspp
^^^^^^^^^^^^^^^^^^^^
The _sspp_subblk_offset() dereferenced "ctx" before it is checked and
then it also derefereces "ctx->cap->sblk" without checking.
422 || !scaler3_cfg || !ctx || !ctx->cap || !ctx->cap->sblk)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So these will have already crashed before we reach this point.
423 return;
424
regards,
dan carpenter
next reply other threads:[~2021-10-01 13:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 13:49 Dan Carpenter [this message]
2021-10-01 13:50 ` [bug report] drm/msm: Add SDM845 DPU support Dan Carpenter
2021-10-01 19:03 ` jesszhan
2021-10-19 23:37 ` Jessica Zhang
-- strict thread matches above, loose matches on Subject: below --
2021-10-04 13:46 Dan Carpenter
2021-10-01 14:21 Dan Carpenter
2021-10-01 12:28 Dan Carpenter
2021-10-01 19:04 ` jesszhan
2018-10-01 9:38 Dan Carpenter
2018-10-01 9:42 ` Dan Carpenter
2018-10-05 19:54 ` jsanka
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=20211001134912.GA9248@kili \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsanka@codeaurora.org \
--cc=linux-arm-msm@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 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.