Skip to contentSkip to conversation

common: miiphyutil: no need to check name of mii_dev

PATCH In review Peng Fan 5 participants 5 messages Nov 24, 2015 – Dec 6, 2015

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 common: miiphyutil: no need to check name of mii_dev

The entry name of mii_dev is an array not pointer, so no need to check.

Cc Joe Hershberger <[email protected]>
Cc Simon Glass <[email protected]>
Cc Bin Meng <[email protected]>
---
 common/miiphyutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/miiphyutil.c +1 -1
index e499b58..0811e09 100644
@@ -159,7 +159,7 @@ void mdio_free(struct mii_dev *bus)
 
 int mdio_register(struct mii_dev *bus)
 {
-	if (!bus || !bus->name || !bus->read || !bus->write)
+	if (!bus || !bus->read || !bus->write)
 		return -1;
 
 	/* check if we have unique name */
Signature · 1 line
2.6.2
#3 lore raw

PATCH 1/1 common: miiphyutil: no need to check name of mii_dev

In reply to Peng Fan
Quoted 16 lines · Peng Fan

The entry name of mii_dev is an array not pointer, so no need to check.

Cc Joe Hershberger <[email protected]>
Cc Simon Glass <[email protected]>
Cc Bin Meng <[email protected]>
---
 common/miiphyutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/miiphyutil.c +0 -0
index e499b58..0811e09 100644

common/miiphyutil.c void mdio_free(struct mii_dev *bus)

Quoted 9 lines
common/miiphyutil.c +1 -2
@@ -159,7 +159,7 @@ void mdio_free(struct mii_dev *bus)
 
 int mdio_register(struct mii_dev *bus)
 {
-       if (!bus || !bus->name || !bus->read || !bus->write)
+       if (!bus || !bus->read || !bus->write)
                return -1;
 
        /* check if we have unique name */
--
#4 lore raw
In reply to Peng Fan
Quoted 10 lines · Peng Fan

The entry name of mii_dev is an array not pointer, so no need to check.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151206/31259e7f/attachment.sig>