From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/10] i2c: Correct command return values
Date: Mon, 4 Jan 2016 08:08:10 +0100 [thread overview]
Message-ID: <568A1A5A.2080602@denx.de> (raw)
In-Reply-To: <1451391772-6203-9-git-send-email-sjg@chromium.org>
Hello Simon,
Am 29.12.2015 um 13:22 schrieb Simon Glass:
> We should not return a -ve error code from command functions. Instead,
> return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
> shell" error messages from the hush shell.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/cmd_i2c.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Thanks! As it is in a patchserie:
Acked-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
>
> diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
> index 552c875..b3bb644 100644
> --- a/common/cmd_i2c.c
> +++ b/common/cmd_i2c.c
> @@ -1809,7 +1809,8 @@ static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
> if (ret)
> printf("Failure changing bus number (%d)\n", ret);
> }
> - return ret;
> +
> + return ret ? CMD_RET_FAILURE : 0;
> }
> #endif /* defined(CONFIG_SYS_I2C) */
>
> @@ -1852,7 +1853,8 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
> if (ret)
> printf("Failure changing bus speed (%d)\n", ret);
> }
> - return ret;
> +
> + return ret ? CMD_RET_FAILURE : 0;
> }
>
> /**
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2016-01-04 7:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing " Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings Simon Glass
2015-12-29 13:23 ` Stefan Roese
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf() Simon Glass
2016-01-15 13:22 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 06/10] dm: gpio: " Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 08/10] i2c: Correct command return values Simon Glass
2016-01-04 7:08 ` Heiko Schocher [this message]
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 09/10] malloc_simple: Display an error when memory is exhausted Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation Simon Glass
2016-01-16 1:26 ` Simon Glass
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=568A1A5A.2080602@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/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.