Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if'...
authorGeorgios Emmanouil <geo.emmnl@gmail.com>
Thu, 2 Mar 2017 15:38:05 +0000 (17:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 13:43:46 +0000 (14:43 +0100)
Removed unnecessary 'if' statement and integrated the condition to the
previous 'if' statement.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 15ff0a89b6ea86f141c56ab377b07bbe3dd95887..4679372d7d16fe73d7183c251a24776f1715be27 100644 (file)
@@ -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) {