From: Heinrich Schuchardt Date: Sun, 31 Jul 2016 10:39:15 +0000 (+0200) Subject: mwifiex: remove superfluous condition X-Git-Tag: v4.9-rc1~127^2~176^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f69e67058fbe9750a4f66ea30b4b6a8648a2fdc;p=platform%2Fkernel%2Flinux-exynos.git mwifiex: remove superfluous condition for_each_property_of_node is only executed if the property prop is not NULL. Signed-off-by: Heinrich Schuchardt Acked-by: Amitkumar Karwar Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 108c11c..d1f8011 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1485,7 +1485,7 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv, continue; /* property header is 6 bytes, data must fit in cmd buffer */ - if (prop && prop->value && prop->length > 6 && + if (prop->value && prop->length > 6 && prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) { ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA, HostCmd_ACT_GEN_SET, 0,