diff mbox series

[dev-5.7,v1,1/4] net: npcm-emc: modify check mac_address function

Message ID 20200913095126.119727-1-tmaimon77@gmail.com
State Not Applicable, archived
Headers show
Series [dev-5.7,v1,1/4] net: npcm-emc: modify check mac_address function | expand

Commit Message

Tomer Maimon Sept. 13, 2020, 9:51 a.m. UTC
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
 drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joel Stanley Sept. 14, 2020, 10:40 a.m. UTC | #1
Hi Tomer,

On Sun, 13 Sep 2020 at 09:51, Tomer Maimon <tmaimon77@gmail.com> wrote:
>

I'm able to apply these patches, but we've moved from 5.7 to 5.8. I
have applied to dev-5.8 instead.

It would be good to see an upstream submission of the emc driver :)

Cheers,

Joel


> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
> index 9872da33fa5d..f07449e2f68d 100644
> --- a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
> +++ b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
> @@ -1752,7 +1752,7 @@ static void get_mac_address(struct net_device *dev)
>
>         mac_address = of_get_mac_address(np);
>
> -       if (mac_address != 0)
> +       if (!IS_ERR(mac_address))
>                 ether_addr_copy(dev->dev_addr, mac_address);
>
>         if (is_valid_ether_addr(dev->dev_addr)) {
> --
> 2.22.0
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
index 9872da33fa5d..f07449e2f68d 100644
--- a/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
+++ b/drivers/net/ethernet/nuvoton/npcm7xx_emc.c
@@ -1752,7 +1752,7 @@  static void get_mac_address(struct net_device *dev)
 
 	mac_address = of_get_mac_address(np);
 
-	if (mac_address != 0)
+	if (!IS_ERR(mac_address))
 		ether_addr_copy(dev->dev_addr, mac_address);
 
 	if (is_valid_ether_addr(dev->dev_addr)) {