Subject: Re: [PATCH] bcmsysport:Fix error handling in the function bcm_sysport_init_rx_ring

From: Florian Fainelli <[email-masked]>
Date: Fri, 17 Jul 2015 10:08:13 -0700

On 17/07/15 05:13, Nicholas Krause wrote:
> This fixes the error handling in the function bcm_sysport_init_rx_ringi
> after calling the function rdma_enable_set to make sure the return value 
> is equal to zero and if not print on the console failed to enable RDMA
> for the device and return the failed error code returned by
> rdma_enable_set.

Subject should be starting with "net: systemport: ", otherwise, this
looks good to me:

Reviewed-by: Florian Fainelli <[email-masked]>
Tested-by: Florian Fainelli <[email-masked]>

> 
> Signed-off-by: Nicholas Krause <[email-masked]>
> ---
>  drivers/net/ethernet/broadcom/bcmsysport.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
> index 4566cdf..27a7b36 100644
> --- a/drivers/net/ethernet/broadcom/bcmsysport.c
> +++ b/drivers/net/ethernet/broadcom/bcmsysport.c
> @@ -1365,7 +1365,12 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
>  	/* Initialize HW, ensure RDMA is disabled */
>  	reg = rdma_readl(priv, RDMA_STATUS);
>  	if (!(reg & RDMA_DISABLED))
> -		rdma_enable_set(priv, 0);
> +		ret = rdma_enable_set(priv, 0);
> +
> +	if (ret) {
> +		netif_err(priv, hw, priv->netdev, "failed to enable RDMA\n");
> +		return ret;
> +	}
>  
>  	rdma_writel(priv, 0, RDMA_WRITE_PTR_LO);
>  	rdma_writel(priv, 0, RDMA_WRITE_PTR_HI);
> 

-- 
Florian