From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [media] rc: sunxi-cir: Initialize the spinlock properly
Date: Tue, 22 Dec 2015 12:43:55 +0100 [thread overview]
Message-ID: <5679377B.3030004@redhat.com> (raw)
In-Reply-To: <1450758455-22945-1-git-send-email-wens@csie.org>
Hi,
On 22-12-15 05:27, Chen-Yu Tsai wrote:
> The driver allocates the spinlock but fails to initialize it correctly.
> The kernel reports a BUG indicating bad spinlock magic when spinlock
> debugging is enabled.
>
> Call spin_lock_init() on it to initialize it correctly.
>
> Fixes: b4e3e59fb59c ("[media] rc: add sunxi-ir driver")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Good catch:
Acked-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/media/rc/sunxi-cir.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
> index 7830aef3db45..40f77685cc4a 100644
> --- a/drivers/media/rc/sunxi-cir.c
> +++ b/drivers/media/rc/sunxi-cir.c
> @@ -153,6 +153,8 @@ static int sunxi_ir_probe(struct platform_device *pdev)
> if (!ir)
> return -ENOMEM;
>
> + spin_lock_init(&ir->ir_lock);
> +
> if (of_device_is_compatible(dn, "allwinner,sun5i-a13-ir"))
> ir->fifo_size = 64;
> else
>
next prev parent reply other threads:[~2015-12-22 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 4:27 [PATCH] [media] rc: sunxi-cir: Initialize the spinlock properly Chen-Yu Tsai
2015-12-22 11:43 ` Hans de Goede [this message]
2015-12-22 20:38 ` Maxime Ripard
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=5679377B.3030004@redhat.com \
--to=hdegoede@redhat.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).