Commit c2a8637c authored by Yang Li's avatar Yang Li Committed by Johannes Berg

net: wireless: wext_compat.c: Remove redundant assignment to ps

Variable 'ps' is set to wdev->ps but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.

Cleans up the following clang-analyzer warning:

net/wireless/wext-compat.c:1170:7: warning: Value stored to 'ps' during
its initialization is never read [clang-analyzer-deadcode.DeadStores]
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1619603945-116891-1-git-send-email-yang.lee@linux.alibaba.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e93bdd78
...@@ -1167,7 +1167,7 @@ static int cfg80211_wext_siwpower(struct net_device *dev, ...@@ -1167,7 +1167,7 @@ static int cfg80211_wext_siwpower(struct net_device *dev,
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
bool ps = wdev->ps; bool ps;
int timeout = wdev->ps_timeout; int timeout = wdev->ps_timeout;
int err; int err;
......
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