Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2089972rwn; Fri, 16 Sep 2022 05:40:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6znvv1zLPIwv7tcc84xF/Ru7fLJ0qtqyTs+G1LZnX1ZfdBX2OZXfXA0gcda6tVe/hJfg5C X-Received: by 2002:a17:902:cec8:b0:178:6c66:cf16 with SMTP id d8-20020a170902cec800b001786c66cf16mr4657141plg.121.1663332006307; Fri, 16 Sep 2022 05:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663332006; cv=none; d=google.com; s=arc-20160816; b=kxb/21rpMn31+mKPqMqUERJV4NK+/k4eLnIVYUcp7AdjNLobeYFHx2atbDYPb0ccf7 +VhGeBE4i7GxmDhw96jUgMKONsFp2qzT906qLhqx2RhtzEhdt+Uz8+D+tWQSBiKP5Myj 1DNGLWOlJLvAwRJmxHfUteyLtHZs91jKqMeTL8o+xO3vm2U5S3C6zvQCZ8UZ0N6NV6dY 0xzFLlbbUwCUvmqRCnClub7n5SJg1bvan7Rgt+H+60xOMYybdP3ysrgigYa8YmeC+1Ry VomcS8HXbsN51OLmkypVwZgUhmZEIE/tIwW7AzLgR7vGlAWPGS/3cLpNdmfxWEi1J2tS Zx/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZIu7s3K4+u7oP2s+yRQB4MCBJbH4a9+nIR767W2HTCo=; b=uztFQeyy5iEzLBWSLF8oEgq1+PFAiUJillq8EvGI1+DCN/IcFVrFXTSBDc1/7lwnCu FqgAUXfiLznVRO40TM0MYomOzUdw7zoiyL/sZV4kzfeMD0JpKC6goGGa2TEgS78B/tnt UajXhNPEQsVzyBkwGnjHnoxb09N0K7JbqypZNzKyMqe77GU1HuJJfBbbKravCAorMwMp rjWpq1Ru6cOdJRe+TnHgTrqkhC4m+v3U2ZWDIf4F6+aTYDYlHWpdctJntRNbBDIC2AZj T7IOFt5Y3+UmNPmMDCvT53fO9Ik0zHuRWvPuyJotJQnCQ4jEYDvB6BqjxdTNDF6TPWTV ol0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HM0PX8aB; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob3-20020a17090b390300b00200aa62790dsi2402242pjb.94.2022.09.16.05.39.53; Fri, 16 Sep 2022 05:40:06 -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=@linaro.org header.s=google header.b=HM0PX8aB; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbiIPM3y (ORCPT + 99 others); Fri, 16 Sep 2022 08:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbiIPM3l (ORCPT ); Fri, 16 Sep 2022 08:29:41 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CDB01103 for ; Fri, 16 Sep 2022 05:29:31 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id n8so8471006wmr.5 for ; Fri, 16 Sep 2022 05:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ZIu7s3K4+u7oP2s+yRQB4MCBJbH4a9+nIR767W2HTCo=; b=HM0PX8aBtfDpBSw8wWnR+KIEZ5a+cvTFkcvdZLX41FPb2v5LpVB4XaCOUdCO3NHX/N msjEPqqhauJ/vGN7IGoHL0dCihZ/POVO10DiF5QIjnI8w9AaRMNd1EJTBo6fOqr6ExsJ 8LT5qQPclOQ0H8j2ZgcXno1rp1/wgiMV/Xn7hUynite/sshc7hbG9cgJC4ywlES95ITy oW+h9g4JSaC9L9YJUl9M75vSmbvGIm3nebis86mN4zVpREMZSVUofCdjUasT1FYcvG7y xg6+YnbFUFZfDDsBDyMWddwCYTwHMo+8Ku1wcTYsKZw3xrBAVKvY+KLc2d84F/cjZGuM c0Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ZIu7s3K4+u7oP2s+yRQB4MCBJbH4a9+nIR767W2HTCo=; b=e8UB182IhLVqJokd7VA71+CGCuxP+GXmHt7Vvcg80bm1HhzyD3uAwjYuurFDscAaj0 VZgO206tEHCKLsxMO9nhegEeyD8/MiZZFtTaL+Ltg0lHvOOWaW0Ad7rv5uP9p6e+MSrG ndPtIn9yjC3IHpf+XQ7ZqS14ll3w/KNBYBTSjkznpQig4dfSLDbIN8k2m1wVMzpvm/eA E8QWn6M0Tb8wyXFg8WEdOk2H29ukWwoijUjbbDtzkuCSQ1BmlAD/RItq/oCMl4l9MXI5 X5exofYEoBmAbC9JMy/lIgjKs12YR72Jlsw/6kFLALrE7DLC1uiR1RPKG0KdN77nhhB7 MagA== X-Gm-Message-State: ACrzQf11Ve0bWIjQmzmboB3Iv7NmvVrjv4Y+YOe1DR+R/ukjyAdKbjDy cRbetxztLog7ezCQ5/cHLn6DIw== X-Received: by 2002:a05:600c:4f11:b0:3b4:bf6c:4566 with SMTP id l17-20020a05600c4f1100b003b4bf6c4566mr1048183wmq.34.1663331370096; Fri, 16 Sep 2022 05:29:30 -0700 (PDT) Received: from srini-hackbase.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id m188-20020a1c26c5000000b003b4a68645e9sm1990825wmm.34.2022.09.16.05.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 05:29:29 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Srinivas Kandagatla Subject: [PATCH 3/4] slimbus: qcom-ngd: simplify error paths with dev_err_probe Date: Fri, 16 Sep 2022 13:29:09 +0100 Message-Id: <20220916122910.170730-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220916122910.170730-1-srinivas.kandagatla@linaro.org> References: <20220916122910.170730-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 From: Krzysztof Kozlowski Use dev_err_probe to skip printing of deferred probe errors and to simplify error paths. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index bacc6af1d51e..cec11aa106bf 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1543,10 +1543,8 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt, IRQF_TRIGGER_HIGH, "slim-ngd", ctrl); - if (ret) { - dev_err(&pdev->dev, "request IRQ failed\n"); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "request IRQ failed\n"); ctrl->nb.notifier_call = qcom_slim_ngd_ssr_notify; ctrl->notifier = qcom_register_ssr_notifier("lpass", &ctrl->nb); @@ -1575,15 +1573,14 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) ctrl->pdr = pdr_handle_alloc(slim_pd_status, ctrl); if (IS_ERR(ctrl->pdr)) { - dev_err(dev, "Failed to init PDR handle\n"); - ret = PTR_ERR(ctrl->pdr); + ret = dev_err_probe(dev, PTR_ERR(ctrl->pdr), + "Failed to init PDR handle\n"); goto err_pdr_alloc; } pds = pdr_add_lookup(ctrl->pdr, "avs/audio", "msm/adsp/audio_pd"); if (IS_ERR(pds) && PTR_ERR(pds) != -EALREADY) { - ret = PTR_ERR(pds); - dev_err(dev, "pdr add lookup failed: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(pds), "pdr add lookup failed\n"); goto err_pdr_lookup; } -- 2.25.1