Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp849165rwd; Tue, 16 May 2023 08:24:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yYzdRtPDVvINksCsGjC5pz6UEkPsq6xUnRhe/YzECoWGv7S3WLET0ExFq51Q612TIyoPL X-Received: by 2002:a17:902:ec87:b0:1a9:9ace:3e74 with SMTP id x7-20020a170902ec8700b001a99ace3e74mr48672330plg.65.1684250669805; Tue, 16 May 2023 08:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684250669; cv=none; d=google.com; s=arc-20160816; b=AwU762cd5rttXhv5tONbRJNtmE2NUXHTA5rMMvOD9Z4Lgsk9tqciJASHCNtDw3rt9X F9H+mNDgLSKiYubdtNlGLEdbAu80ZHyX7xFddumYcv9SBwlMdl4Q8nBKyG6A2EFifX+y 2XKmEGLvgZAId1SYyHWuPdnklBTVqH0V88nc/x5Mg1TU3LAde7tehel1peWyvfuIuzm3 Az5Gi57jR/C++fpK8BlI+XuVb88olIGnNvERZGBzfK7lUUFc298hinsXDNBCFaMbcGuF uk1RQLoS/PBYx2ONWzGWbK6JIesBihrZTk6iCb/OltYLwoTAq0WNXvSbtIcAAR080I9m ALXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZtK7bitluym8dquTleK8XBZNEctGa+MQrAshFu2wJYI=; b=otyZVNcBJXqa5tzg0ujMH55laSmrRrFj5+1iJIh4hwpZYh3hklWaNO2Zn5ic19qu2i g94BQ9Lqrb9WydKmXLwiODIob6stelbr4RVYQUO/ti0l1BSf3nMK4VRhVi5yrbJZO4R2 V2kj85VYb+dIrvO/5gCTJZT+7SveJtMs4v5RjHvPIilhU+cWXm6p5JOzjwb7+PYbli38 SFyM5exzNxPUmBth84qmSZietvXYDfsY0OYqqLL1ScLklS1x5IYeRgOAvvcYhpDJ4tUi 5eSnqBEf4YvqzbtDKLIWh0koFetD845YwtsFk9Ws4rlqcHAnJg3C/OjOvv2il/A7KarI pAYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BKTo913v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170902758700b001ae1bb70a41si4953504pll.168.2023.05.16.08.24.14; Tue, 16 May 2023 08:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BKTo913v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233465AbjEPPUH (ORCPT + 99 others); Tue, 16 May 2023 11:20:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233883AbjEPPT6 (ORCPT ); Tue, 16 May 2023 11:19:58 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07875FCF; Tue, 16 May 2023 08:19:56 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34GFJqWt046666; Tue, 16 May 2023 10:19:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684250392; bh=ZtK7bitluym8dquTleK8XBZNEctGa+MQrAshFu2wJYI=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=BKTo913v/xrQIY6Yw5sihWIYeFGfe6UhhcpA6GTesCI0tlROadOWA4f1APxz7sgQW 1VqOQr7NByKaaxkbBu9fheyqoYp51rpgPn/fgsjSWDWW5qGWJ4ngsVePIrzwtLu9ps /cd0gxOpxhdx8/DrCGI5yQks5tHhSOHQ1V/YT9do= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34GFJqrn103503 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 May 2023 10:19:52 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 16 May 2023 10:19:52 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 16 May 2023 10:19:52 -0500 Received: from [10.250.35.184] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34GFJpk4059866; Tue, 16 May 2023 10:19:52 -0500 Message-ID: Date: Tue, 16 May 2023 10:19:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v3] gpio: sch311x: Use devm_gpiochip_add_data() to simplify remove path Content-Language: en-US To: Andy Shevchenko CC: Peter Tyser , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , , References: <20230515174224.494631-1-afd@ti.com> From: Andrew Davis In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/15/23 4:08 PM, Andy Shevchenko wrote: > On Mon, May 15, 2023 at 8:42 PM Andrew Davis wrote: >> >> Use devm version of gpiochip add function to handle removal for us. > > ...version of gpiochip_add() function... > > ... > >> + err = devm_gpiochip_add_data(&pdev->dev, &block->chip, block); >> if (err < 0) { >> dev_err(&pdev->dev, >> "Could not register gpiochip, %d\n", err); >> - goto exit_err; >> + return err; > > With this applied you can consider a followup to have this be converted to use > > return dev_err_probe(...); > > here and in other ->probe() related pieces. > Sure, I can add that cleanup to my list. Or maybe Coccinelle can help do this everywhere, will have to look into that. Andrew >> } >