mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Vadim Fedorenko <vfedorenko@novek.ru> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0fb0bf7a8c
commit
9a7a1be6b6
1 changed files with 1 additions and 1 deletions
|
@ -2155,7 +2155,7 @@ ptp_ocp_fb_set_pins(struct ptp_ocp *bp)
|
||||||
struct ptp_pin_desc *config;
|
struct ptp_pin_desc *config;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
config = kzalloc(sizeof(*config) * 4, GFP_KERNEL);
|
config = kcalloc(4, sizeof(*config), GFP_KERNEL);
|
||||||
if (!config)
|
if (!config)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue