Commit 49753128 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

mwifiex: remove unneeded NULL check

We dereference "rate" on the lines before so the checks here are too
late to help.  This function is only called from
mwifiex_dump_station_info() and "rate" is always a non-NULL pointer
so the check can be removed.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent aef0ba54
...@@ -868,10 +868,10 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv, ...@@ -868,10 +868,10 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
ret = mwifiex_rate_ioctl_cfg(priv, rate); ret = mwifiex_rate_ioctl_cfg(priv, rate);
if (!ret) { if (!ret) {
if (rate && rate->is_rate_auto) if (rate->is_rate_auto)
rate->rate = mwifiex_index_to_data_rate(priv->tx_rate, rate->rate = mwifiex_index_to_data_rate(priv->tx_rate,
priv->tx_htinfo); priv->tx_htinfo);
else if (rate) else
rate->rate = priv->data_rate; rate->rate = priv->data_rate;
} else { } else {
ret = -1; ret = -1;
......
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