aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r--net/dsa/dsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 079a224471e7..392e29a0227d 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -359,7 +359,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
359 */ 359 */
360 ds = kzalloc(sizeof(*ds) + drv->priv_size, GFP_KERNEL); 360 ds = kzalloc(sizeof(*ds) + drv->priv_size, GFP_KERNEL);
361 if (ds == NULL) 361 if (ds == NULL)
362 return NULL; 362 return ERR_PTR(-ENOMEM);
363 363
364 ds->dst = dst; 364 ds->dst = dst;
365 ds->index = index; 365 ds->index = index;
@@ -370,7 +370,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
370 370
371 ret = dsa_switch_setup_one(ds, parent); 371 ret = dsa_switch_setup_one(ds, parent);
372 if (ret) 372 if (ret)
373 return NULL; 373 return ERR_PTR(ret);
374 374
375 return ds; 375 return ds;
376} 376}
@@ -633,7 +633,7 @@ static int dsa_of_probe(struct device *dev)
633 if (cd->sw_addr > PHY_MAX_ADDR) 633 if (cd->sw_addr > PHY_MAX_ADDR)
634 continue; 634 continue;
635 635
636 if (!of_property_read_u32(np, "eeprom-length", &eeprom_len)) 636 if (!of_property_read_u32(child, "eeprom-length", &eeprom_len))
637 cd->eeprom_len = eeprom_len; 637 cd->eeprom_len = eeprom_len;
638 638
639 for_each_available_child_of_node(child, port) { 639 for_each_available_child_of_node(child, port) {