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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D686C433EF for ; Thu, 28 Apr 2022 07:38:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245642AbiD1Hls convert rfc822-to-8bit (ORCPT ); Thu, 28 Apr 2022 03:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245633AbiD1Hlr (ORCPT ); Thu, 28 Apr 2022 03:41:47 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1AD99D053 for ; Thu, 28 Apr 2022 00:38:30 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njyjA-0002DT-UD; Thu, 28 Apr 2022 09:38:16 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1njyjA-005iCB-4B; Thu, 28 Apr 2022 09:38:14 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1njyj7-0002Na-Pf; Thu, 28 Apr 2022 09:38:13 +0200 Message-ID: Subject: Re: [RFC/RFT v2 04/11] phy: rockchip: Support PCIe v3 From: Philipp Zabel To: Frank Wunderlich , linux-rockchip@lists.infradead.org Cc: Frank Wunderlich , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , Lorenzo Pieralisi , Krzysztof =?UTF-8?Q?Wilczy=C5=84ski?= , Johan Jonker , Peter Geis , Michael Riesch , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Date: Thu, 28 Apr 2022 09:38:13 +0200 In-Reply-To: <20220426132139.26761-5-linux@fw-web.de> References: <20220426132139.26761-1-linux@fw-web.de> <20220426132139.26761-5-linux@fw-web.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-pci@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Frank, On Di, 2022-04-26 at 15:21 +0200, Frank Wunderlich wrote: > + priv->p30phy = devm_reset_control_get_exclusive(dev, "phy"); > + if (IS_ERR(priv->p30phy)) { > + dev_warn(dev, "no phy reset control specified\n"); > + priv->p30phy = NULL; > + } Please use devm_reset_control_get_optional_exclusive() [1] instead, which already returns NULL if no reset control is specified, and return on errors. [1] https://docs.kernel.org/driver-api/reset.html#c.devm_reset_control_get_optional_exclusive regards Philipp