Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1393f1bc authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8192e: remove redundant null check on array alg



u.crypt.alg is an array of u8 integers and hence the null check on
this array is redundant and can be removed.

Detected with CoverityScan, CID#146583 ("Array compared against 0")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f40c60db
Loading
Loading
Loading
Loading
+15 −17
Original line number Diff line number Diff line
@@ -3365,7 +3365,6 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
	} else
		sec.flags &= ~SEC_ACTIVE_KEY;

	if (param->u.crypt.alg != NULL) {
	memcpy(sec.keys[param->u.crypt.idx],
	       param->u.crypt.key,
	       param->u.crypt.key_len);
@@ -3382,7 +3381,6 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
		sec.flags |= SEC_LEVEL;
		sec.level = SEC_LEVEL_3;
	}
	}
 done:
	if (ieee->set_security)
		ieee->set_security(ieee->dev, &sec);