public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 2/4] compulab: eeprom: propagate error value in read_mac_addr()
Date: Sun, 6 Sep 2015 15:58:14 +0300	[thread overview]
Message-ID: <55EC3866.5050504@compulab.co.il> (raw)
In-Reply-To: <1441529318-23973-3-git-send-email-nikita@compulab.co.il>

On 09/06/15 11:48, Nikita Kiryanov wrote:
> cl_eeprom_read_mac_addr() doesn't differentiate between success case and
> inability to access eeprom. Fix this by propagating the return value of
> cl_eeprom_setup().
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
> Changes in V2:
> 	- New patch
> 
>  board/compulab/common/eeprom.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
> index aaacd2e..9f18a3d 100644
> --- a/board/compulab/common/eeprom.c
> +++ b/board/compulab/common/eeprom.c
> @@ -105,9 +105,11 @@ void get_board_serial(struct tag_serialnr *serialnr)
>  int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
>  {
>  	uint offset;
> +	int err;
>  
> -	if (cl_eeprom_setup(eeprom_bus))
> -		return 0;
> +	err = cl_eeprom_setup(eeprom_bus);
> +	if (err)
> +		return err;
>  
>  	offset = (cl_eeprom_layout != LAYOUT_LEGACY) ?
>  			MAC_ADDR_OFFSET : MAC_ADDR_OFFSET_LEGACY;
> 

-- 
Regards,
Igor.

  reply	other threads:[~2015-09-06 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06  8:48 [U-Boot] [PATCH V2 0/4] cm-fx6 updates for Utilite Nikita Kiryanov
2015-09-06  8:48 ` [U-Boot] [PATCH V2 1/4] compulab: eeprom: select i2c bus when querying for board rev Nikita Kiryanov
2015-09-06  8:48 ` [U-Boot] [PATCH V2 2/4] compulab: eeprom: propagate error value in read_mac_addr() Nikita Kiryanov
2015-09-06 12:58   ` Igor Grinberg [this message]
2015-09-06  8:48 ` [U-Boot] [PATCH V2 3/4] compulab: eeprom: add support for obtaining product name Nikita Kiryanov
2015-09-06 13:30   ` Igor Grinberg
2015-09-06  8:48 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm-fx6: modify device tree for old revisions of utilite Nikita Kiryanov
2015-09-06 13:38   ` Igor Grinberg
2015-09-13  8:36 ` [U-Boot] [PATCH V2 0/4] cm-fx6 updates for Utilite Stefano Babic
2015-09-16 10:10   ` Igor Grinberg
2015-09-16 16:50     ` Nikita Kiryanov
2015-09-22  7:52       ` Stefano Babic

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=55EC3866.5050504@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox