mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] commands: trigger: check trigger disable return code too
Date: Wed, 30 Jul 2014 21:34:35 +0400	[thread overview]
Message-ID: <1406741676-1641-5-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1406741676-1641-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 commands/trigger.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/commands/trigger.c b/commands/trigger.c
index 17c8411..b605448 100644
--- a/commands/trigger.c
+++ b/commands/trigger.c
@@ -68,8 +68,9 @@ static int do_trigger(int argc, char *argv[])
 		break;
 
 	case LED_COMMAND_DISABLE_TRIGGER:
-		led_set_trigger(trigger, NULL);
-		return 0;
+		ret = led_set_trigger(trigger, NULL);
+		break;
+
 	case LED_COMMAND_SET_TRIGGER:
 		if (argc - optind != 1)
 			return COMMAND_ERROR_USAGE;
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  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 ` [PATCH 3/5] led: triggers: fix crash on disabling "default-on" trigger Antony Pavlov
2014-07-30 17:34 ` Antony Pavlov [this message]
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-5-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