Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591283

[PATCH 3/3] Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if' statement

From Georgios Emmanouil <geo.emmnl@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if' statement
Date 2017-03-02 18:00 +0100
Message-ID <tgCf7-56J-19@gated-at.bofh.it> (permalink)
References <tgB9o-4qi-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Removed unnecessary 'if' statement and integrated the condition to the
previous 'if' statement.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index bbe1a09..4936e80 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1355,13 +1355,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 					} else {
 						strConnectInfo.status = pstrConnectRespInfo->status;

-						if (strConnectInfo.status == SUCCESSFUL_STATUSCODE) {
-							if (pstrConnectRespInfo->ies) {
-								strConnectInfo.resp_ies_len = pstrConnectRespInfo->ies_len;
-								strConnectInfo.resp_ies = kmalloc(pstrConnectRespInfo->ies_len, GFP_KERNEL);
-								memcpy(strConnectInfo.resp_ies, pstrConnectRespInfo->ies,
-								       pstrConnectRespInfo->ies_len);
-							}
+						if (strConnectInfo.status == SUCCESSFUL_STATUSCODE && pstrConnectRespInfo->ies) {
+							strConnectInfo.resp_ies_len = pstrConnectRespInfo->ies_len;
+							strConnectInfo.resp_ies = kmalloc(pstrConnectRespInfo->ies_len, GFP_KERNEL);
+							memcpy(strConnectInfo.resp_ies, pstrConnectRespInfo->ies,
+							       pstrConnectRespInfo->ies_len);
 						}

 						if (pstrConnectRespInfo) {
--
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] Staging:wilc1000:host_interface: Fixed alignment to match open parenthesis Georgios Emmanouil <geo.emmnl@gmail.com> - 2017-03-02 16:50 +0100
  [PATCH 3/3] Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if' statement Georgios Emmanouil <geo.emmnl@gmail.com> - 2017-03-02 18:00 +0100
    Re: [PATCH 3/3] Staging:wilc1000:host_interface: Integrated two 'if'  statements to a single 'if' statement Julian Calaby <julian.calaby@gmail.com> - 2017-03-05 00:00 +0100
  Re: [PATCH 2/3] Staging:wilc1000:host_interface: Fixed alignment to  match open parenthesis Julian Calaby <julian.calaby@gmail.com> - 2017-03-05 00:00 +0100

csiph-web