Skip to content

Commit f6e0e2a

Browse files
Bogicevic Sasagregkh
authored andcommitted
drivers:staging:wilc1000 Fix all comparison to NULL could be written ...
This fixes all "comparison to NULL could be written like ..." Signed-off-by: Bogicevic Sasa <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ff5d40a commit f6e0e2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/staging/wilc1000/coreconfigurator.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo
436436

437437
/* Get DTIM Period */
438438
pu8TimElm = get_tim_elm(pu8msa, u16RxLen + FCS_LEN, u8index);
439-
if (pu8TimElm != NULL)
439+
if (pu8TimElm)
440440
pstrNetworkInfo->u8DtimPeriod = pu8TimElm[3];
441441
pu8IEs = &pu8msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN];
442442
u16IEsLen = u16RxLen - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN);
@@ -470,8 +470,8 @@ s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo)
470470
{
471471
s32 s32Error = 0;
472472

473-
if (pstrNetworkInfo != NULL) {
474-
if (pstrNetworkInfo->pu8IEs != NULL) {
473+
if (pstrNetworkInfo) {
474+
if (pstrNetworkInfo->pu8IEs) {
475475
kfree(pstrNetworkInfo->pu8IEs);
476476
pstrNetworkInfo->pu8IEs = NULL;
477477
} else {
@@ -555,8 +555,8 @@ s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo)
555555
{
556556
s32 s32Error = 0;
557557

558-
if (pstrConnectRespInfo != NULL) {
559-
if (pstrConnectRespInfo->pu8RespIEs != NULL) {
558+
if (pstrConnectRespInfo) {
559+
if (pstrConnectRespInfo->pu8RespIEs) {
560560
kfree(pstrConnectRespInfo->pu8RespIEs);
561561
pstrConnectRespInfo->pu8RespIEs = NULL;
562562
} else {

0 commit comments

Comments
 (0)