Received: by 10.223.176.46 with SMTP id f43csp320478wra; Tue, 23 Jan 2018 21:51:44 -0800 (PST) X-Google-Smtp-Source: AH8x226TxmUFzV94Wqtfcc6/DMMCS19caSZ1Mqim/ShTmAEB34lL/HBEqFZRK9g3U2+5o+rKPn+w X-Received: by 10.101.91.193 with SMTP id o1mr9317898pgr.315.1516773104065; Tue, 23 Jan 2018 21:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516773104; cv=none; d=google.com; s=arc-20160816; b=YOLFahfqyaWulwdgmjxNmohtmMgwY8aWURvZNHwwJKkwVReYc8OF65sC/ylNz0pqMw wBtgGMEohiWhxgzziC47JX9FUCuMMVbKWZ07wp+DL0NqltQgRXTJK2p04CKpeZqFk5g2 pppoW3TTwiLYe++cymVH33qF+2gq8K784Veg7m5wg9AQh2OJLnqnKGwBpVH4rFJZaYaL YSmnbjJfHFE4MCj+6lqzk/H5TNjWeQ5TuBqm1St8GE3EPSturhf/6r9avb4blVUizV8Q AnXlTB4beyVirGQHHcr4sM6POV6fXihJRhvLb/NynvIKr9HZT1htU04QEuiTMdfNEaoy VLqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=JMF6TDOphqFlPabWBepyLSSzMnaXfOpkXgDgK1c89/4=; b=GHV/RMR4KYZEXrXyj7GXzr4hRYm4Ri79TdVV7HEqh1DxWRjzBayVNRJ/F61gzPkDQb nNuv9zAp0R/HF38CVYQ2EzqFWXTlgxn4DsLgAZEglFPHhEsWybMyzooF6FR0IMl+U+oj 04u6CblDYDJHuatnIjp/uIq022YlHP2bBmr+b36izQCVWazntEM6gubH92FlJgr2BGcQ UiUVHYYv15/6B++5PzAMFRjP75Pn208qzqnbqzBKrZlFCszuf1jgGEVlEKjur1hb+7bT cuK3eoE1yS+Q+2tZGJpvazpabsWU0s+aIy/btSgFuBUtFE9xaOpPOlUjrLW6pH0+FG83 vVtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=D8LEwNA/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si5742330plk.234.2018.01.23.21.51.30; Tue, 23 Jan 2018 21:51:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=D8LEwNA/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbeAXFu3 (ORCPT + 99 others); Wed, 24 Jan 2018 00:50:29 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:12482 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbeAXFu2 (ORCPT ); Wed, 24 Jan 2018 00:50:28 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w0O5nq00014325; Tue, 23 Jan 2018 23:49:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1516772992; bh=gfQcMVvp0AtO0JtPupwXOaBvq0LT0tOUrA7GiMV84QY=; h=Subject:From:To:CC:References:Date:In-Reply-To; b=D8LEwNA/NlbCIbR987rwn4RN8KK7xzqbldoWzhF46Ucr+mDeGunsmxpHZKDA+A1Xy XO9LXqi5pVE7uqTW1pAQdByU3Osp/0um8ZyCLAy6jzXhXklr0QC0GLFBezVdxL0nCs Yowb30+ILEZZSwhqCbCnjQJxuVU3Se7PV0b0whIo= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0O5nqQo025514; Tue, 23 Jan 2018 23:49:52 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 23 Jan 2018 23:49:51 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 23 Jan 2018 23:49:51 -0600 Received: from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0O5nliI019272; Tue, 23 Jan 2018 23:49:47 -0600 Subject: Re: [PATCH 2/3] pwm: pwm-omap-dmtimer: Fix frequency when using prescaler From: Keerthy To: Ladislav Michl , Claudiu Beznea CC: , , , , , , , , , , , , References: <20180117214629.GA11952@lenoch> <20180117214737.GC11952@lenoch> <3e00e721-984c-e8db-49f7-046d7b335404@microchip.com> <20180122105331.GA21159@lenoch> Message-ID: <618f9f28-f655-6d50-5a51-f25ebbb87a54@ti.com> Date: Wed, 24 Jan 2018 11:19:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 24 January 2018 10:56 AM, Keerthy wrote: > > > On Monday 22 January 2018 04:23 PM, Ladislav Michl wrote: >> Dear Claudiu, >> >> On Mon, Jan 22, 2018 at 11:17:08AM +0200, Claudiu Beznea wrote: >>> On 17.01.2018 23:47, Ladislav Michl wrote: >>>> @@ -334,18 +348,18 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) >>>> >>>> mutex_init(&omap->mutex); >>>> >>>> - status = pwmchip_add(&omap->chip); >>>> - if (status < 0) { >>>> + ret = pwmchip_add(&omap->chip); >>>> + if (ret < 0) { >>>> dev_err(&pdev->dev, "failed to register PWM\n"); >>>> - omap->pdata->free(omap->dm_timer); >>>> - ret = status; >>>> - goto put; >>>> + goto free; >>>> } >>>> >>>> platform_set_drvdata(pdev, omap); >>> >From documentation: "of_parse_phandle(): Returns the device_node pointer with refcount >>> incremented. Use of_node_put() on it when done." >>> In case of success the of_node_put() should also be called as I see. >> >> Based on you previous suggestions found here: >> https://patchwork.kernel.org/patch/10140209/ >> I'd say this fix belongs to patch which introduces of_node_put() in the error >> path. I'll then rebase this patches on top of the fix. > > Agreed. I missed the success path as i assumed only error paths needed > te of_node_put(). I will post v8 of this patch alone as other patches > can be left untouched. Hope that is okay. Ladis, I posted v8 of the above mentioned patch alone. https://marc.info/?l=linux-omap&m=151677273619960&w=2 Thanks, Keerthy > > Regards, > Keerthy >> >> Thank you, >> ladis >>