From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] watchdog: bcm281xx: Fix use of uninitialized spinlock.
Date: Thu, 27 Apr 2017 18:28:11 -0700 [thread overview]
Message-ID: <8592b4ab-3277-d8ef-a227-91ad30f05328@gmail.com> (raw)
In-Reply-To: <20170428010232.19905-1-eric@anholt.net>
On 04/27/2017 06:02 PM, Eric Anholt wrote:
> The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so
> initialize it earlier. Fixes a warning at boot with lock debugging
> enabled.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 6adb730dc208 ("watchdog: bcm281xx: Watchdog Driver")
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/watchdog/bcm_kona_wdt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/bcm_kona_wdt.c b/drivers/watchdog/bcm_kona_wdt.c
> index 6fce17d5b9f1..a5775dfd8d5f 100644
> --- a/drivers/watchdog/bcm_kona_wdt.c
> +++ b/drivers/watchdog/bcm_kona_wdt.c
> @@ -304,6 +304,8 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)
> if (!wdt)
> return -ENOMEM;
>
> + spin_lock_init(&wdt->lock);
> +
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> wdt->base = devm_ioremap_resource(dev, res);
> if (IS_ERR(wdt->base))
> @@ -316,7 +318,6 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)
> return ret;
> }
>
> - spin_lock_init(&wdt->lock);
> platform_set_drvdata(pdev, wdt);
> watchdog_set_drvdata(&bcm_kona_wdt_wdd, wdt);
> bcm_kona_wdt_wdd.parent = &pdev->dev;
>
--
Florian
next prev parent reply other threads:[~2017-04-28 1:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 1:02 [PATCH] watchdog: bcm281xx: Fix use of uninitialized spinlock Eric Anholt
2017-04-28 1:28 ` Florian Fainelli [this message]
2017-04-28 2:27 ` Guenter Roeck
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=8592b4ab-3277-d8ef-a227-91ad30f05328@gmail.com \
--to=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).