Commit 830c8ddc authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Jakub Kicinski
Browse files

ethernet: ucc_geth: replace kmalloc+memset by kzalloc

parent 0a71c415
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -2904,14 +2904,11 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
	 * allocated resources can be released when the channel is freed.
	 */
	if (!(ugeth->p_init_enet_param_shadow =
	      kmalloc(sizeof(struct ucc_geth_init_pram), GFP_KERNEL))) {
	      kzalloc(sizeof(struct ucc_geth_init_pram), GFP_KERNEL))) {
		if (netif_msg_ifup(ugeth))
			pr_err("Can not allocate memory for p_UccInitEnetParamShadows\n");
		return -ENOMEM;
	}
	/* Zero out *p_init_enet_param_shadow */
	memset((char *)ugeth->p_init_enet_param_shadow,
	       0, sizeof(struct ucc_geth_init_pram));

	/* Fill shadow InitEnet command parameter structure */