From: Dan Carpenter Date: Wed, 21 Sep 2011 07:13:56 +0000 (+0300) Subject: mwifiex: remove unneeded NULL check X-Git-Tag: MMI-PSA29.97-13-9~18194^2~183^2~41 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49753128d8fc976576c497c81962cf1ae57174aa;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Dan Carpenter Acked-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 215c65ae23ee..1df5ef6b4953 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -868,10 +868,10 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv, ret = mwifiex_rate_ioctl_cfg(priv, rate); if (!ret) { - if (rate && rate->is_rate_auto) + if (rate->is_rate_auto) rate->rate = mwifiex_index_to_data_rate(priv->tx_rate, priv->tx_htinfo); - else if (rate) + else rate->rate = priv->data_rate; } else { ret = -1;