]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: txgbe: leave space for null terminators on property_entry
authorFabio Baltieri <fabio.baltieri@gmail.com>
Sun, 5 Apr 2026 22:20:13 +0000 (23:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Apr 2026 02:11:37 +0000 (19:11 -0700)
Lists of struct property_entry are supposed to be terminated with an
empty property, this driver currently seems to be allocating exactly the
amount of entry used.

Change the struct definition to leave an extra element for all
property_entry.

Fixes: c3e382ad6d15 ("net: txgbe: Add software nodes to support phylink")
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Tested-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20260405222013.5347-1-fabio.baltieri@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/txgbe/txgbe_type.h

index 82433e9cb0e33ebb2835d478b5dea296fd4c0d55..6b05f32b4a0109e3fa1f8a74c1b9f8836318bdff 100644 (file)
@@ -424,10 +424,10 @@ struct txgbe_nodes {
        char i2c_name[32];
        char sfp_name[32];
        char phylink_name[32];
-       struct property_entry gpio_props[1];
-       struct property_entry i2c_props[3];
-       struct property_entry sfp_props[8];
-       struct property_entry phylink_props[2];
+       struct property_entry gpio_props[2];
+       struct property_entry i2c_props[4];
+       struct property_entry sfp_props[9];
+       struct property_entry phylink_props[3];
        struct software_node_ref_args i2c_ref[1];
        struct software_node_ref_args gpio0_ref[1];
        struct software_node_ref_args gpio1_ref[1];