Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp693601pxa; Thu, 27 Aug 2020 13:09:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJz1R39gzb2fjMa/PZfdjqW53AtkceBF3o355k1X+z0D4ELVV0aE32L0mjL5SQktje40+v X-Received: by 2002:a17:907:42cc:: with SMTP id nz20mr23166268ejb.429.1598558992487; Thu, 27 Aug 2020 13:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598558992; cv=none; d=google.com; s=arc-20160816; b=1EHvBxCBf8B/3IG07nlMyEqGLzCk2CGSPXTek0ob0p+iMAEn8UcCqi5KN/fkgXmW0S a5TQdjNW0G378uVllgOEX+dnq8rppUPS3WANGon04HKHVKL9HhxEt+dOh+Bh2daY7Nyc b6JigYvquAC7elGQiVyu041RocXOEyUsFhA+p6gHrc4e6xmCUC0MWo9twEzchIK+O5Oz QmtDwiegkO+CH62FTE6TDAfaVYurpssGBA5aYn2iohQLKIm1v3Ufp41OKuBvUEirOGvd fnqGmTwcLrtbyYSAZfQLUmN9cxJYmc0oi9NwdbFAOBn89rhTl8dGQkPfNbQbt62nnrng TRGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=dzpT/k/5wKaBcF7sXPFz03OwAg9aV2zF3eS7RP4iT9w=; b=zm+h82A0nalL/GplBv5wIS+VbRcH1u/kykGUCcmLCR/eQFp8v4zz+Gq2uvirCfDj8G I+8KQdVLuVtSkGBqrwdjLL8h0dfyXHBEXETIlXdA6dTLx96oPvcj/Jy8zHS8gRWOcrVx ceVWMsoflhtAtHNBHs8TcfuvRbo4mQ/H4FaVCUY9iTnftsCFEgQz+6hXSGLoMYA7cEI8 +FwcRAGW0LrH5GO1R8WeWKuvT2ABn+zbj1euHpU0xwj/+LeU68EI2jwb5i884GwFHvqB XyAUPwv0FyGbgVxnPo/KEoxx/oM5UwN+B7muM5xDsc/fe9g8B9w5MZavcjhJR4Z2GOtY caHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s1jCf85k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm16si2056882ejb.525.2020.08.27.13.09.30; Thu, 27 Aug 2020 13:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s1jCf85k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgH0UIs (ORCPT + 99 others); Thu, 27 Aug 2020 16:08:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbgH0UIo (ORCPT ); Thu, 27 Aug 2020 16:08:44 -0400 Received: from localhost.localdomain (unknown [194.230.155.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D601208D5; Thu, 27 Aug 2020 20:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598558923; bh=xl8J41Jd34mayLp7JsZohH5l8Z/xyH60BLO5q6GW978=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s1jCf85kf9gUWk+cboz4RbMo+kbKymOjBmvK8MSRzQSI0+0079W9y+PJ+YLap35BD ahUJl48XNuIUk5N1VIgJ2BdrDuAGr/y0ePeZgn2V2f8axn94ZrrZUTMgC3H2JrdcSn dhwJOE/tt9B2LszTiVINSYgUMi6PtILVcrkbjYo0= From: Krzysztof Kozlowski To: Ray Jui , Linus Walleij , Bartosz Golaszewski , Florian Fainelli , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Keerthy , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Michal Simek , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 3/6] gpio: omap: Simplify with dev_err_probe() Date: Thu, 27 Aug 2020 22:08:24 +0200 Message-Id: <20200827200827.26462-3-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200827200827.26462-1-krzk@kernel.org> References: <20200827200827.26462-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski --- drivers/gpio/gpio-omap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 7fbe0c9e1fc1..2dc12f4addbd 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev) if (bank->irq <= 0) { if (!bank->irq) bank->irq = -ENXIO; - if (bank->irq != -EPROBE_DEFER) - dev_err(dev, - "can't get irq resource ret=%d\n", bank->irq); - return bank->irq; + return dev_err_probe(dev, bank->irq, "can't get irq resource\n"); } bank->chip.parent = dev; -- 2.17.1