From: Dan Carpenter <dan.carpenter@oracle.com>
To: steven.price@arm.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/panfrost: Enable devfreq to work without regulator
Date: Thu, 22 Aug 2019 12:15:12 +0300 [thread overview]
Message-ID: <20190822091512.GA32661@mwanda> (raw)
Hello Steven Price,
This is a semi-automatic email about new static checker warnings.
The patch e21dd290881b: "drm/panfrost: Enable devfreq to work without
regulator" from Aug 16, 2019, leads to the following Smatch complaint:
drivers/gpu/drm/panfrost/panfrost_devfreq.c:56 panfrost_devfreq_target()
error: we previously assumed 'pfdev->regulator' could be null (see line 42)
drivers/gpu/drm/panfrost/panfrost_devfreq.c
41 */
42 if (old_clk_rate < target_rate && pfdev->regulator) {
^^^^^^^^^^^^^^^^
We added some new checks.
43 err = regulator_set_voltage(pfdev->regulator, target_volt,
44 target_volt);
45 if (err) {
46 dev_err(dev, "Cannot set voltage %lu uV\n",
47 target_volt);
48 return err;
49 }
50 }
51
52 err = clk_set_rate(pfdev->clock, target_rate);
53 if (err) {
54 dev_err(dev, "Cannot set frequency %lu (%d)\n", target_rate,
55 err);
56 regulator_set_voltage(pfdev->regulator, pfdev->devfreq.cur_volt,
^^^^^^^^^^^^^^^^
But here it isn't checked.
57 pfdev->devfreq.cur_volt);
58 return err;
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-08-22 9:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 9:15 Dan Carpenter [this message]
2019-08-22 9:32 ` [PATCH] drm/panfrost: Add missing check for pfdev->regulator Steven Price
2019-08-23 1:52 ` Rob Herring
2019-08-23 9:37 ` Steven Price
2019-08-23 9:37 ` Steven Price
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=20190822091512.GA32661@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=steven.price@arm.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.