From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA0DC64E7B for ; Tue, 1 Dec 2020 18:23:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13BD020870 for ; Tue, 1 Dec 2020 18:23:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rtzVJfDE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13BD020870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tkos.co.il Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-reply-to:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8PVgZsStBwyIvUdN8ApvB5DfJmqWZQsvjZiRa0ClcR0=; b=rtzVJfDEwcMvJ2hbPv41LWcY/ I/1kw1Ver9ZC/nPg9fIQkMlGhybiJZkPcPfxo1zUDa/B3bRosJmhMqgNSn9rqUidJ0ueYThXr5Ywl UJC+di7WlwW0G/prlKw6mSnoTvGTtY+p5hKMgaROiGXGmZ6PZgrhoSFdmMGxDFonvHYdzIduBfE6R Uj1hw5X3y4lkTj3USygSQ27VTBahj+PHGBhLPw0AaQZkRyedcpIjwJgdJNIscc31RjbZnvHNjDpIG jZotDJCUGvRpCiaqdzKwCOw7oHtV/7QSfUpNgcjWO/KVCak4Rpau47j4fgaXIEXb95jNcVgt6LSiO vBm7yxK9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkAHh-000673-Op; Tue, 01 Dec 2020 18:21:53 +0000 Received: from guitar.tcltek.co.il ([192.115.133.116] helo=mx.tkos.co.il) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkAHd-00065e-DV for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2020 18:21:52 +0000 Received: from tarshish (unknown [10.0.8.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 0910B440069; Tue, 1 Dec 2020 20:21:36 +0200 (IST) References: <20201118231811.GH1853236@lunn.ch> <878sax6f43.fsf@tarshish> <20201119133429.GS1804098@lunn.ch> <877dqhfogp.fsf@tarshish> User-agent: mu4e 1.4.13; emacs 27.1 From: Baruch Siach To: Bartosz Golaszewski Subject: Re: [PATCH 3/5] gpio: mvebu: add pwm support for Armada 8K/7K In-reply-to: Date: Tue, 01 Dec 2020 20:21:33 +0200 Message-ID: <87lfeho09e.fsf@tarshish> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201201_132149_808078_97457C6C X-CRM114-Status: GOOD ( 25.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Sascha Hauer , linux-pwm@vger.kernel.org, Linus Walleij , Chris Packham , linux-gpio , Thierry Reding , Thomas Petazzoni , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Ralph Sennhauser , Lee Jones , Gregory Clement , arm-soc , Sebastian Hesselbarth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Bartosz, On Tue, Dec 01 2020, Bartosz Golaszewski wrote: > On Thu, Nov 19, 2020 at 2:47 PM Baruch Siach wrote: >> On Thu, Nov 19 2020, Andrew Lunn wrote: >> >> >> @@ -1200,6 +1235,13 @@ static int mvebu_gpio_probe(struct platform_device *pdev) >> >> >> >> >> >> devm_gpiochip_add_data(&pdev->dev, &mvchip->chip, mvchip); >> >> >> >> >> >> + /* Some MVEBU SoCs have simple PWM support for GPIO lines */ >> >> >> + if (IS_ENABLED(CONFIG_PWM)) { >> >> >> + err = mvebu_pwm_probe(pdev, mvchip, id); >> >> >> + if (err) >> >> >> + return err; >> >> >> + } >> >> >> + >> >> > >> >> > The existing error handling looks odd here. Why is there no goto >> >> > err_domain when probing the PWMs fails? I wonder if this a bug from me >> >> > from a long time again? >> >> >> >> What would you release under the err_domain label? As far as I can see >> >> all resources are allocated using devres, and released automatically on >> >> failure exit. >> > >> > The IRQ domain is still registers. So once the memory is automatically >> > freed, don't we have a potential use after free? >> >> This patch moves PWM registration before IRQ domain registration for >> another reason as mentioned in the commit log. So this might >> incidentally fix the bug. >> >> Would you prefer a separate patch for that with a 'Fixes: >> 757642f9a584e8' tag? > > Baruch: does this series conflict with the fix you sent? I'm thinking > about how to take it through the next and fixes trees. Yes, It conflicts. I can send in a single series v3 of the fix along with the other patches rebased on top. Would that work for you? Thanks, baruch -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel