Commit 9d9effca authored by Xin Long's avatar Xin Long Committed by Jakub Kicinski

ethtool: eeprom: fix null-deref on genl_info in dump

The similar fix as commit 46cdedf2 ("ethtool: pse-pd: fix null-deref on
genl_info in dump") is also needed for ethtool eeprom.

Fixes: c781ff12 ("ethtool: Allow network drivers to dump arbitrary EEPROM data")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/5575919a2efc74cd9ad64021880afc3805c54166.1666362167.git.lucien.xin@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 337a0a0b
...@@ -124,7 +124,7 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base, ...@@ -124,7 +124,7 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base,
if (ret) if (ret)
goto err_free; goto err_free;
ret = get_module_eeprom_by_page(dev, &page_data, info->extack); ret = get_module_eeprom_by_page(dev, &page_data, info ? info->extack : NULL);
if (ret < 0) if (ret < 0)
goto err_ops; goto err_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment