From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] led: triggers: fix crash on disabling "default-on" trigger
Date: Wed, 30 Jul 2014 21:34:34 +0400 [thread overview]
Message-ID: <1406741676-1641-4-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1406741676-1641-1-git-send-email-antonynpavlov@gmail.com>
Here is a sample crash log on Ritmix RZX-50:
barebox:/ trigger
0: panic
1: heartbeat
2: net rx
3: net tx
4: net
5: default on (led 0)
barebox:/ trigger -d 5
...
Ooops, TLB miss on store!
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/led/led-triggers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/led/led-triggers.c b/drivers/led/led-triggers.c
index 5eaf732..1a5a09f 100644
--- a/drivers/led/led-triggers.c
+++ b/drivers/led/led-triggers.c
@@ -124,7 +124,7 @@ int led_set_trigger(enum led_trigger trigger, struct led *led)
triggers[trigger].led = led;
- if (trigger == LED_TRIGGER_DEFAULT_ON)
+ if (led && trigger == LED_TRIGGER_DEFAULT_ON)
led_set(triggers[trigger].led, triggers[trigger].led->max_value);
return 0;
--
2.0.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-07-30 17:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 17:34 [PATCH 0/5] led-related series Antony Pavlov
2014-07-30 17:34 ` [PATCH 1/5] MIPS: dts: rzx50.dts: add LCD backlight Antony Pavlov
2014-07-30 17:34 ` [PATCH 2/5] MIPS: ritmix-rzx50_defconfig: enable LED-related stuff Antony Pavlov
2014-07-30 17:34 ` Antony Pavlov [this message]
2014-07-30 17:34 ` [PATCH 4/5] commands: trigger: check trigger disable return code too Antony Pavlov
2014-07-30 17:34 ` [PATCH 5/5] led: triggers: fix "no previous prototype for 'trigger_init'" warning Antony Pavlov
2014-07-31 6:05 ` [PATCH 0/5] led-related series Sascha Hauer
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=1406741676-1641-4-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@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