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

Commit d272f9dd authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Use kzalloc instead of kmalloc.



This patch uses kzalloc instead of kmalloc function.
A coccinelle script was used to make this change.

Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0507a1e5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3421,12 +3421,11 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,

		lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt);

		new_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL);
		new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL);
		if (new_crypt == NULL) {
			ret = -ENOMEM;
			goto done;
		}
		memset(new_crypt, 0, sizeof(struct lib80211_crypt_data));
		new_crypt->ops = ops;
		if (new_crypt->ops)
			new_crypt->priv =