[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220916224009.g4prlpphnji5i4zi@skbuf>
Date:   Fri, 16 Sep 2022 22:40:10 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Colin Foster <colin.foster@...advantage.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>
Subject: Re: [PATCH v1 net-next 2/2] net: mscc: ocelot: check return values of
 writes during reset
On Fri, Sep 16, 2022 at 12:13:49PM -0700, Colin Foster wrote:
> -	regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_ENA], 1);
> -	regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1);
> +	err = regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_ENA], 1);
> +	if (err)
> +		return err;
>  
> -	return 0;
> +	err = regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1);
> +
> +	return err;
>  }
A kernel janitor will come and patch this up to:
	return regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1);
so it's better to do it yourself.
Powered by blists - more mailing lists