Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp423008pxb; Tue, 19 Oct 2021 05:49:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydXp9xkFRbOJNWLJIWVqDawfx3wIuM8BML1w7H6HIYWz7ikx0e5hVGqMNtPMYKLxL4Fu8O X-Received: by 2002:a63:9245:: with SMTP id s5mr28939746pgn.4.1634647756106; Tue, 19 Oct 2021 05:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634647756; cv=none; d=google.com; s=arc-20160816; b=q8lIgFPXJMPi1PhOGDRErYVmUKTAlBEZMmgvTb+cvPlTyr+kU2vWi1cuod4ezQpMJr x9UZ1apY9cVANiTjrQYq36MdrdYIkDqIy8h3jsFa6ylo472gHPgeZFuADLJbLKbUpXk3 eE7VQOrtZQ1elNspnWgCmrANfklnDVUdYkMV8EN4AO1oImwf8DDqcT6KJffrQsDieLWJ g20PMP5fQNFXJ5u0VHXbRZOu0IIjZr96vweN7x8nJaUNJbF4KmR5zrfseekgArFxj49M 8Wb/KsjwPo+i58/ZLSrwFUHi+YuTWLgujRr5vwHxVL7bMs6q1wzs8rxgW816Nccoy/AC wY9w== 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 :message-id:date:subject:cc:to:from; bh=dDLKqSi6BeQdUnkF9hLpOXWdavkxIBUH3yCuZWPM6Us=; b=y0t6Pwe4+6idrV038+wMJWMmCo0Qz71bt1zWvCMfu/Q9phxAfsTQjRKCJEpn3NYm9Y DfDyOl/EjfOR6eQzscKO+WWt/pAHE3KxiU9km337bpcG+MZN32I7dp3n+5tiAy6dNAEw ci97pWMNSq1iiQCR18gUZ7HaCPuRhs1pH8IjsyarN2xg6vk4nyhJCWfSs3CrlaHcho8/ 1PvhGBRdU7nQhkPhcXy3JnErQWenv8m8G9uTMl4BBnTsZafaCGMjBtZRVi6IhXzfYrIB AP1YCwE8vOsCBjO05yuIf8JgmWCfVLexkhVynBolDTOlaKxrI8vWq2jDUJwDw+WF7Ooc jVOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si4674238plg.82.2021.10.19.05.49.07; Tue, 19 Oct 2021 05:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbhJSMu6 (ORCPT + 64 others); Tue, 19 Oct 2021 08:50:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbhJSMu5 (ORCPT ); Tue, 19 Oct 2021 08:50:57 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C54B3C061746 for ; Tue, 19 Oct 2021 05:48:44 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:b4c3:ba80:54db:46f]) by albert.telenet-ops.be with bizsmtp id 7ooj2600412AN0U06oojrJ; Tue, 19 Oct 2021 14:48:43 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mcoXq-0069Sw-Tg; Tue, 19 Oct 2021 14:48:42 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mcoXp-00EJ7U-VP; Tue, 19 Oct 2021 14:48:41 +0200 From: Geert Uytterhoeven To: Kalle Valo , "David S . Miller" , Jakub Kicinski , Tony Lindgren , Russell King Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] net: wlcore: spi: Use dev_err_probe() Date: Tue, 19 Oct 2021 14:48:41 +0200 Message-Id: <465e76901b801ac0755088998249928fd546c08a.1634647460.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use the existing dev_err_probe() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven --- Compile-tested only. --- drivers/net/wireless/ti/wlcore/spi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index f26fc150ecd01460..354a7e1c3315c6e2 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -488,12 +488,9 @@ static int wl1271_probe(struct spi_device *spi) spi->bits_per_word = 32; glue->reg = devm_regulator_get(&spi->dev, "vwlan"); - if (PTR_ERR(glue->reg) == -EPROBE_DEFER) - return -EPROBE_DEFER; - if (IS_ERR(glue->reg)) { - dev_err(glue->dev, "can't get regulator\n"); - return PTR_ERR(glue->reg); - } + if (IS_ERR(glue->reg)) + return dev_err_probe(glue->dev, PTR_ERR(glue->reg), + "can't get regulator\n"); ret = wlcore_probe_of(spi, glue, pdev_data); if (ret) { -- 2.25.1