Received: by 10.223.176.46 with SMTP id f43csp2755972wra; Mon, 22 Jan 2018 02:54:48 -0800 (PST) X-Google-Smtp-Source: AH8x226X/bti7GLvdFaFx697Q5Q9OtuXYaadQiLJMkgrS7mzzKA3bK7ai7sRzL9QbRVKxySG5j0f X-Received: by 10.99.150.25 with SMTP id c25mr4510229pge.136.1516618488831; Mon, 22 Jan 2018 02:54:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516618488; cv=none; d=google.com; s=arc-20160816; b=qKELH7tsCIPLm98z75t6eMeVXLmXmSggpvhrpC0WoJ/oTDzqQT+kZ13n4AICEZSNfS t32kZVrgDyk8qKzvC++sYsy2+oJ+dbc5UE3R3sMhi/a2D/uQqzozB+LJJLVodwhhOO33 dD7F+BpON/kcyU4xz7Xowv9lvIH6A4jI6dkbCSs1yROzoMXXJSkiX20cvpqjdA6aTBbD YLwXmFjdg7Pj7Z5J/Td+oQ+UFcGXKaqIkeAHiKxXySaSeAUbZmDGzeF3SPY7PT8q399+ 5HacVyDCKRnekOC8rl43PqENKaQUBdnabAWnJPyppjfwloYOpTHPAWG0cZieRVbn1dn7 Rf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=sRQ84FsyQTJ6CNfJnSk/ZSugmlesQmw6xbslXkqRbwc=; b=o6LrC6tswq9RE1gJzCUKdx+9x1IKgcMLGY0xVJ3zUx4hsU/V+MaHINEj90x4jhScz/ XSF9m4Opj2NfMoXC2w0526ldHBURIQZmC4PctbdG+jKtwwJ1dKQAR8dgm5CHcBXUYi6A kjsOKcakdboeoUUTpWFbZujLRO2xSctPjnHiq7GwpLFRlAd6ae1/hMouX0eUxYcJakCG L/GthkSla1RNTAD8nZgqKuk1DJslrlbr4vCEdRJa2i2FmIN51nQwLMhZeTeiINWUs7wC 99vJ29pBSwHwGIvSpX2o72Rvzbxo03vMlpg7x00AyxqXCNh1Q3q3/aAMbA9w+XetHky5 XDvA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b184si4842pfg.179.2018.01.22.02.54.34; Mon, 22 Jan 2018 02:54:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbeAVKxi (ORCPT + 99 others); Mon, 22 Jan 2018 05:53:38 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:57758 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbeAVKxh (ORCPT ); Mon, 22 Jan 2018 05:53:37 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990412AbeAVKxewdXfR (ORCPT + 2 others); Mon, 22 Jan 2018 11:53:34 +0100 Date: Mon, 22 Jan 2018 11:53:31 +0100 From: Ladislav Michl To: Claudiu Beznea Cc: linux-omap@vger.kernel.org, linux-pwm@vger.kernel.org, Keerthy , daniel.lezcano@linaro.org, thierry.reding@gmail.com, tony@atomide.com, aaro.koskinen@iki.fi, narmstrong@baylibre.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sebastian.reichel@collabora.co.uk, robh+dt@kernel.org, t-kristo@ti.com, grygorii.strashko@ti.com Subject: Re: [PATCH 2/3] pwm: pwm-omap-dmtimer: Fix frequency when using prescaler Message-ID: <20180122105331.GA21159@lenoch> References: <20180117214629.GA11952@lenoch> <20180117214737.GC11952@lenoch> <3e00e721-984c-e8db-49f7-046d7b335404@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e00e721-984c-e8db-49f7-046d7b335404@microchip.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thank you, ladis