On Mon, Feb 13, 2017 at 07:51:06PM -0800, Dmitry Torokhov wrote:
> @@ -269,13 +269,13 @@ static int ptp_populate_pins(struct ptp_clock *ptp)
> struct ptp_clock_info *info = ptp->info;
> int err = -ENOMEM, i, n_pins = info->n_pins;
>
> - ptp->pin_dev_attr = kzalloc(n_pins * sizeof(
kcalloc/kmalloc_array are more semantically correct when allocating arrays
of objects, and overflow-safe.
Signed-off-by: Dmitry Torokhov
---
drivers/ptp/ptp_sysfs.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/ptp/ptp_sysfs.c b/drivers/ptp/ptp_sysfs.c
inde