From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752487AbeAXF05 (ORCPT ); Wed, 24 Jan 2018 00:26:57 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:63856 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488AbeAXF0y (ORCPT ); Wed, 24 Jan 2018 00:26:54 -0500 Subject: Re: [PATCH 2/3] pwm: pwm-omap-dmtimer: Fix frequency when using prescaler To: Ladislav Michl , Claudiu Beznea CC: , , , , , , , , , , , , References: <20180117214629.GA11952@lenoch> <20180117214737.GC11952@lenoch> <3e00e721-984c-e8db-49f7-046d7b335404@microchip.com> <20180122105331.GA21159@lenoch> From: Keerthy Message-ID: Date: Wed, 24 Jan 2018 10:56:07 +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: <20180122105331.GA21159@lenoch> 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Keerthy > > Thank you, > ladis >