Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbdG0UIu (ORCPT ); Thu, 27 Jul 2017 16:08:50 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:36924 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdG0UIr (ORCPT ); Thu, 27 Jul 2017 16:08:47 -0400 Date: Thu, 27 Jul 2017 22:08:29 +0200 From: Richard Cochran To: Grygorii Strashko Cc: "David S. Miller" , netdev@vger.kernel.org, Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Wingman Kwok , Ivan Khoronzhuk , John Stultz , Thomas Gleixner Subject: Re: [PATCH v3 1/3] ptp: introduce ptp auxiliary worker Message-ID: <20170727200829.cqe2gb6kl4lfzyux@localhost.localdomain> References: <20170726221138.12986-1-grygorii.strashko@ti.com> <20170726221138.12986-2-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170726221138.12986-2-grygorii.strashko@ti.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 731 Lines: 23 On Wed, Jul 26, 2017 at 05:11:36PM -0500, Grygorii Strashko wrote: > @@ -217,6 +231,19 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, > mutex_init(&ptp->pincfg_mux); > init_waitqueue_head(&ptp->tsev_wq); > > + if (ptp->info->do_aux_work) { > + char *worker_name = kasprintf(GFP_KERNEL, "ptp%d", ptp->index); This string is allocated but never freed. > + kthread_init_delayed_work(&ptp->aux_work, ptp_aux_kworker); > + ptp->kworker = kthread_create_worker(0, worker_name ? > + worker_name : info->name); > + if (IS_ERR(ptp->kworker)) { > + err = PTR_ERR(ptp->kworker); > + pr_err("failed to create ptp aux_worker %d\n", err); > + goto kworker_err; > + } > + } > + Thanks, Richard