From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752784AbdBIKED (ORCPT ); Thu, 9 Feb 2017 05:04:03 -0500 Received: from mail-it0-f51.google.com ([209.85.214.51]:37305 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbdBIKEA (ORCPT ); Thu, 9 Feb 2017 05:04:00 -0500 Subject: Re: [PATCH] omapfb: dss: Handle return error in dss_init_ports. To: Bartlomiej Zolnierkiewicz References: <25198769.WjcufK8OeX@amdc3058> <1645625.BTpumnS8aX@amdc3058> Cc: tomi.valkeinen@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Arvind Yadav Message-ID: Date: Thu, 9 Feb 2017 15:32:58 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1645625.BTpumnS8aX@amdc3058> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yes, We will have to handle cleanup of partially initialized ports. As per your suggestion, I have done the changes. Thanks -Arvind On Wednesday 08 February 2017 07:51 PM, Bartlomiej Zolnierkiewicz wrote: > On Wednesday, February 08, 2017 11:25:47 AM Bartlomiej Zolnierkiewicz wrote: >> Hi, >> >> On Tuesday, February 07, 2017 05:41:37 PM Arvind Yadav wrote: >>> Hi, >>> >>> In dss_init_ports, There is no need to add dss_uninit_ports before >>> returning. >>> Because it's already take care in dss_bind. dss_bind is handling >>> dss_uninit_ports in error path. >> It doesn't handle cleanup of partially initialized ports, > BTW by "partially initialized ports" here I mean cases like > i.e. dpi port fully initialized and sdi one not initialized > >> please look at the code: >> >> ... >> r = dss_init_ports(pdev); >> if (r) >> goto err_init_ports; >> ... >> err_runtime_get: >> pm_runtime_disable(&pdev->dev); >> dss_uninit_ports(pdev); >> err_init_ports: >> if (dss.video1_pll) >> dss_video_pll_uninit(dss.video1_pll); >> ... >> >> dss_uninit_ports() is not called on partially initialized > ditto > >> ports (when dss_init_ports() returns an error we go straight >> into err_init_ports label and skip dss_uninit_ports()) >> >>> -Arvind >>> >>> >>> On Monday 06 February 2017 08:58 PM, Bartlomiej Zolnierkiewicz wrote: >>>> dpi_uninit_port() & sdi_uninit_port() skip not fully >>>> initialized port > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arvind Yadav Date: Thu, 09 Feb 2017 10:14:58 +0000 Subject: Re: [PATCH] omapfb: dss: Handle return error in dss_init_ports. Message-Id: List-Id: References: <25198769.WjcufK8OeX@amdc3058> <1645625.BTpumnS8aX@amdc3058> In-Reply-To: <1645625.BTpumnS8aX@amdc3058> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bartlomiej Zolnierkiewicz Cc: tomi.valkeinen@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Hi, Yes, We will have to handle cleanup of partially initialized ports. As per your suggestion, I have done the changes. Thanks -Arvind On Wednesday 08 February 2017 07:51 PM, Bartlomiej Zolnierkiewicz wrote: > On Wednesday, February 08, 2017 11:25:47 AM Bartlomiej Zolnierkiewicz wrote: >> Hi, >> >> On Tuesday, February 07, 2017 05:41:37 PM Arvind Yadav wrote: >>> Hi, >>> >>> In dss_init_ports, There is no need to add dss_uninit_ports before >>> returning. >>> Because it's already take care in dss_bind. dss_bind is handling >>> dss_uninit_ports in error path. >> It doesn't handle cleanup of partially initialized ports, > BTW by "partially initialized ports" here I mean cases like > i.e. dpi port fully initialized and sdi one not initialized > >> please look at the code: >> >> ... >> r = dss_init_ports(pdev); >> if (r) >> goto err_init_ports; >> ... >> err_runtime_get: >> pm_runtime_disable(&pdev->dev); >> dss_uninit_ports(pdev); >> err_init_ports: >> if (dss.video1_pll) >> dss_video_pll_uninit(dss.video1_pll); >> ... >> >> dss_uninit_ports() is not called on partially initialized > ditto > >> ports (when dss_init_ports() returns an error we go straight >> into err_init_ports label and skip dss_uninit_ports()) >> >>> -Arvind >>> >>> >>> On Monday 06 February 2017 08:58 PM, Bartlomiej Zolnierkiewicz wrote: >>>> dpi_uninit_port() & sdi_uninit_port() skip not fully >>>> initialized port > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics >