2016-07-31 10:39:34

by Heinrich Schuchardt

[permalink] [raw]
Subject: [PATCH 1/1] mwifiex: remove superfluous condition

for_each_property_of_node is only executed if the
property prop is not NULL.

Signed-off-by: Heinrich Schuchardt <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index 7897037..128add8 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -1482,7 +1482,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,
--
2.8.1



2016-08-01 10:49:17

by Amitkumar Karwar

[permalink] [raw]
Subject: RE: [PATCH 1/1] mwifiex: remove superfluous condition

> From: Heinrich Schuchardt [mailto:[email protected]]
> Sent: Sunday, July 31, 2016 4:09 PM
> To: Amitkumar Karwar; Nishant Sarmukadam; Kalle Valo
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Heinrich Schuchardt
> Subject: [PATCH 1/1] mwifiex: remove superfluous condition
>
> for_each_property_of_node is only executed if the property prop is not
> NULL.
>
> Signed-off-by: Heinrich Schuchardt <[email protected]>
> ---
> drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> index 7897037..128add8 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> @@ -1482,7 +1482,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,

Thanks. The patch looks fine to me.

Acked-by: Amitkumar Karwar <[email protected]>

Regards,
Amitkumar

2016-09-03 10:03:19

by Kalle Valo

[permalink] [raw]
Subject: Re: [1/1] mwifiex: remove superfluous condition

Heinrich Schuchardt <[email protected]> wrote:
> for_each_property_of_node is only executed if the
> property prop is not NULL.
>
> Signed-off-by: Heinrich Schuchardt <[email protected]>
> Acked-by: Amitkumar Karwar <[email protected]>

Thanks, 1 patch applied to wireless-drivers-next.git:

2f69e67058fb mwifiex: remove superfluous condition

--
Sent by pwcli
https://patchwork.kernel.org/patch/9253329/