lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri,  3 May 2019 17:32:47 +0200
From:   Petr Štetiar <>
        Greg Kroah-Hartman <>
Cc:     Petr Štetiar <>,
        Andrew Lunn <>,
        Florian Fainelli <>,
        Heiner Kallweit <>,
        Frank Rowand <>,
        Srinivas Kandagatla <>,
        Maxime Ripard <>,,
Subject: [PATCH v5] staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error

There was NVMEM support added to of_get_mac_address, so it could now return
ERR_PTR encoded error values, so we need to adjust all current users of
of_get_mac_address to this new fact.

Signed-off-by: Petr Štetiar <>

 Changes since v3:


 Changes since v4:

  * I've just blindly replaced IS_ERR_OR_NULL with IS_ERR in v4, but this was
    wrong, as I've just realized, that we still need to check for NULL in this
    particular case as well, so I've added back IS_ERR_OR_NULL check

 drivers/staging/octeon/ethernet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 986db76..8847a11c2 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -421,7 +421,7 @@ int cvm_oct_common_init(struct net_device *dev)
 	if (priv->of_node)
 		mac = of_get_mac_address(priv->of_node);
-	if (mac)
+	if (!IS_ERR_OR_NULL(mac))
 		ether_addr_copy(dev->dev_addr, mac);

Powered by blists - more mailing lists