From 28cbc899cd8d847d336232f0ccc21a05fd5ea16a Mon Sep 17 00:00:00 2001 From: Sameeh Jubran Date: Sun, 3 May 2020 09:52:15 +0000 Subject: [PATCH] net: ena: remove code that does nothing BugLink: https://bugs.launchpad.net/bugs/1890845 commit cac7172f2d33ae75601d1bc928532d3ef7513db9 upstream. Both key and func parameters are pointers on the stack. Setting them to NULL does nothing. The original intent was to leave the key and func unset in this case, but for this to happen nothing needs to be done as the calling function ethtool_get_rxfh() already clears key and func. This commit removes the above described useless code. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa Acked-by: Stefan Bader Acked-by: Khalid Elmously Signed-off-by: Ian May Signed-off-by: Kelsey Skunberg --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c index ecdb574a549d..56a88dade157 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -670,11 +670,8 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, */ rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func); if (rc) { - if (rc == -EOPNOTSUPP) { - key = NULL; - hfunc = NULL; + if (rc == -EOPNOTSUPP) rc = 0; - } return rc; } -- 2.39.5