Created
November 1, 2020 19:19
-
-
Save damex/a90fa1967ff57188e8d025286abfa829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/drivers/staging/octeon/ethernet.c | |
+++ b/drivers/staging/octeon/ethernet.c | |
@@ -409,6 +409,11 @@ | |
const u8 *mac = NULL; | |
const u8 *label = NULL; | |
+ if (!of_device_is_available(priv->of_node)) { | |
+ of_node_put(priv->of_node); | |
+ return -ENODEV; | |
+ } | |
+ | |
if (priv->of_node) { | |
mac = of_get_mac_address(priv->of_node); | |
label = of_get_property(priv->of_node, "label", NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment