Commit 9a7a1be6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jakub Kicinski
Browse files

ptp_ocp: replace kzalloc(x*y) by kcalloc(y, x)



While here it may be no difference, the kcalloc() has some checks
against overflow and it's logically correct to call it for an array.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarVadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0fb0bf7a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2155,7 +2155,7 @@ ptp_ocp_fb_set_pins(struct ptp_ocp *bp)
	struct ptp_pin_desc *config;
	int i;

	config = kzalloc(sizeof(*config) * 4, GFP_KERNEL);
	config = kcalloc(4, sizeof(*config), GFP_KERNEL);
	if (!config)
		return -ENOMEM;