Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2882384rdh; Mon, 27 Nov 2023 00:54:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0DanZsnZKn4VHhdxB9e7+g/DTMxrlBlqSoBWXe1Ju76CciMVm4CUKWowdDg5qzbWbgIUB X-Received: by 2002:a05:6a20:394f:b0:187:5a4d:7061 with SMTP id r15-20020a056a20394f00b001875a4d7061mr13742603pzg.44.1701075259767; Mon, 27 Nov 2023 00:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701075259; cv=none; d=google.com; s=arc-20160816; b=S0FEhpkuD2wXJNjpsnFEeGKYurkd64rbD55AZJmDQnddoRe40iwB9s/vqYDQYnSFoB wwdydS84HZ0pQpPBi9a04G2cdXX1mwneu9JVlS0mLbNv0pb6QfGCdHdC4OfT2BQDJIs+ PspsaMVnD9eLU0Y3LA7Du7QtwgDR3dqXVDeCyj8vQy9ETHz2N4NDLXiNyAv4deu90nar irBLpQXYXgYQ+ZGvMETa0vJdLtyIqJ5J+HUIszCJE67730IUYozIg/WsHx2td/u5hLE3 G2t3T5BRY9IDXwJl9btpU/L6uV0GdxK2qoTl0zxwe69MzccgZ7UaixdB//6g7MgZFjYE XA2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QxGVCJ6SW8oVcnqKB2Mf+VqGACchqq6L3v4tSwAql58=; fh=gdFw9tkhGlo6BCMzI4mGx3o8aNsJZEQxP72z6/lXjGE=; b=QdDHZjQhKQAZLWPcrvn8s2Z1X6XEb+UUt5H7xz55bHtL0Xp5TkRejJFZ1yU3F1RDzg ej1bL8yV81w8VbZCsINS8y0nSYBicEO+5O79lsCrW9TL5HWKet9bbeRpMoyYfa0rSrRg YR5jER5H9DRwZRmPKNdnCiSy77rR10nxeb1ZEvpqwmHWKTi7iDp/5GgzPe66Okqby8Af GIEi+kpkP0q0xrbzyBZANOggEhRtOu22127Jq4KDKdSp3F3uP5Kaa9O/ulJ+Btf3MRBI MRzOZc7N5YLTTdSS/y8210HbjDdASlHndLuAEuonJUZrNTvcmdHlWxYdcdup6YAhtTev WSsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XZO4aOuX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u24-20020a63df18000000b00588fdd9504bsi9325927pgg.858.2023.11.27.00.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 00:54:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XZO4aOuX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6B212806696F; Mon, 27 Nov 2023 00:54:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232583AbjK0IyB (ORCPT + 99 others); Mon, 27 Nov 2023 03:54:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbjK0Ixz (ORCPT ); Mon, 27 Nov 2023 03:53:55 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5344BCB for ; Mon, 27 Nov 2023 00:54:01 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DD9EC433C7; Mon, 27 Nov 2023 08:53:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701075240; bh=YsSjMoDjG9d/dtc+Vhmds+9B8Q2fIcClNqcZlZ8pY5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XZO4aOuXMP25TUfZbPx+yFAKcQtLr6eNyPYziWmgX5qhff78Uu3JuCLjHuCuNJ+Xy RfEhPzFygaSnA6G35DSp29oMIoXGDRfYPKnT0BgIJr8Ba3QRIJAum7/c+wYVHrzKlx CpP1r+v9aLU24TlYw7E5BGUGZBi/HR+wr3+6oj6KAmW7+rJXaUqCFrmXIDjZbABdB4 FI0UEPG64iSheuHpJGjrrfFPrT4uuGBGnRwjn7uVdR5Le602is29JplScfEwnoKbe3 Wgt9oOLs3FIJaULAtPgEgqjiRWTBn9Q+SbB+k5/TBs2/Fvv4ZHX/OvmCT5lBlVqH6t ENhCRusee4XKQ== Date: Mon, 27 Nov 2023 08:53:56 +0000 From: Lee Jones To: Andy Shevchenko Cc: Jiasheng Jiang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource Message-ID: <20231127085356.GD1470173@google.com> References: <20230609014818.28475-1-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 00:54:17 -0800 (PST) On Fri, 24 Nov 2023, Andy Shevchenko wrote: > On Fri, Jun 09, 2023 at 09:48:18AM +0800, Jiasheng Jiang wrote: > > Add the missing check for platform_get_resource and return error > > if it fails. > > > Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices") > > This does not fix anything and just introduces a duplication code. > I would like this to be reverted. Should I send one? Checking this value at the source of obtention and providing and earlier return with arguably a better return value, all at the cost of an inexpensive pointer comparison to NULL doesn't sound like a terrible idea. If you were committed to the idea of removing it, which I suggest you reconsider, I would insist that you replace it with at least a comment. -- Lee Jones [李琼斯]