Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp990816lqh; Fri, 29 Mar 2024 03:58:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw1ztZnBFI1HlFWdfN7GOzfOmiSDTf4NIfxRiW/maDQHSenE7N6EKIJH6R/znms42byvFEwk7pqUrhvKHb6U/aEqirffOaNalwWmgvJA== X-Google-Smtp-Source: AGHT+IGv4dvN7Pll7TVvd6XkdcCRu4bpUYc3q+xcxoxByS3q/FlecH47GZOZhRVKZv9SUdM9asRu X-Received: by 2002:a05:620a:10a9:b0:789:e6cc:7565 with SMTP id h9-20020a05620a10a900b00789e6cc7565mr2112078qkk.19.1711709883516; Fri, 29 Mar 2024 03:58:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711709883; cv=pass; d=google.com; s=arc-20160816; b=wQqr8/TIAEnoKzJO9gWqHH0koiP8wr1hoEhFMhEpIjXODs+bZ1kkejBcU3jiC2JqwX 33jYxi7OdqO5ZuR92a5gctbgjAInBekxHcfAvJWggbBfET9NQtvHV2rwr+rYZeV82vpy 4c1gDY5fST8ZbDxmKYZ7ip+stSHQvFrmWvLqSXQaf8qFiX8vbFmqVNh1tYLsOpMn6F3q NBDQoCw2UgHm7sFh2oAZybybPV0WacsKTLvdtULkJm7m7Z4PqdJ07bqRD0rStGNmtDRY 4ibETvrpB/v1TCnBOG3by1SvF2svgm5T2BnombMaUxqxVNLUZU0R1waESo/dG1GKU9C0 iMYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=wmPEkMFEnUlG+AspxKseMSlfLQd5beqGsFICBRbMEiU=; fh=gZClyzT/eJjApr5eNXSCZCyUGDwc0nMn1hVkLcyIyUY=; b=nfh/7W4hTeelZEQ+oxhRfSK/1wjbw/MMbfnUFc3U93v5UuohoK/cjDUSjJf6rm/u7i H/DWkrbnRKX1xuQHgcLc4xHw6rP/jYAYLl4nfS6rgit7u9xFHNdXo6BHEwOzflxBc6mA AjiAX6e5RouZh0wzqkIUBdE0PRVW72jLC4rssKrsfu09QQXuVQBV7J72RO+sNBeb2r/h DiVxazY4uw4LAr7jQBVEDhe+DrQVdpyAmal5FAjMOKMt0XCL8ksonotL8xRk7DGGjXfG WbfW4MKNpzEjPefXPxGJjyObaE8bF3xceOY1K+84YNUn+diV322teR8zAHZF5MgA5m70 1wzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-124413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124413-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m24-20020a05620a215800b00789f812f4d4si3544940qkm.440.2024.03.29.03.58.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 03:58:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-124413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124413-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3DBBA1C23BC6 for ; Fri, 29 Mar 2024 10:58:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E7EF83A1B; Fri, 29 Mar 2024 10:56:51 +0000 (UTC) Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDC807BB0D for ; Fri, 29 Mar 2024 10:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711709810; cv=none; b=h47ycFb53JCGm/ednXaPw81vZ6F/+bi4o5ItdidHEBkqgopziBZ/2HSc7vvwHEj6LIU37nFOhmjabG2m5N07rem8wnRuuvLpfh9jsan4JdnDL/I5MR0vqrr45fm1yEoF6qHilyiLVX5q403nijuPOvSIWSiFHnBgGUJQblNyFoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711709810; c=relaxed/simple; bh=GrV47NT5vn8t81Ahr/eNUVMeiZ6ilTSttqyQGbii5b0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SJy67qikKSmDhUnTV+nl2F42zx8hqVNx6Rv8ANC8ewRPnpDSo//wemZqJ/8aQaD2bvWfOxu0Ud9KutxZER1OMPTdmgDnak/Hj/s/YBsogpMmRFW6PiK7/sagYJhF863PIMVlbkadL4GvU073IwhtsnnBt2Ee9041V5LbtrmYaRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id 0791ead8-edbb-11ee-b3cf-005056bd6ce9; Fri, 29 Mar 2024 12:56:43 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Andy Shevchenko , AngeloGioacchino Del Regno , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v2 08/11] pinctrl: aw9523: Make use of dev_err_probe() Date: Fri, 29 Mar 2024 12:55:22 +0200 Message-ID: <20240329105634.712457-9-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329105634.712457-1-andy.shevchenko@gmail.com> References: <20240329105634.712457-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andy Shevchenko Simplify the error handling in probe function by switching from dev_err() to dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-aw9523.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-aw9523.c b/drivers/pinctrl/pinctrl-aw9523.c index f084dad5c88f9..fe398c59c2d11 100644 --- a/drivers/pinctrl/pinctrl-aw9523.c +++ b/drivers/pinctrl/pinctrl-aw9523.c @@ -816,10 +816,8 @@ static int aw9523_init_irq(struct aw9523 *awi, int irq) ret = devm_request_threaded_irq(dev, irq, NULL, aw9523_irq_thread_func, IRQF_ONESHOT, dev_name(dev), awi); - if (ret) { - dev_err(dev, "Failed to request irq %d\n", irq); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to request irq %d\n", irq); girq = &awi->gpio.irq; gpio_irq_chip_set_chip(girq, &aw9523_irq_chip); @@ -1016,8 +1014,7 @@ static int aw9523_probe(struct i2c_client *client) awi->pctl = devm_pinctrl_register(dev, pdesc, awi); if (IS_ERR(awi->pctl)) { - ret = PTR_ERR(awi->pctl); - dev_err(dev, "Cannot register pinctrl: %d", ret); + ret = dev_err_probe(dev, PTR_ERR(awi->pctl), "Cannot register pinctrl"); goto err_disable_vregs; } -- 2.44.0