Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp905398rdb; Fri, 22 Dec 2023 08:20:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmT58F3errZHquA4xNF5Gqox9uFvi5B8F9gPq68DMJt6HvtrEejXOmAqRgdRxkcvMtXzxE X-Received: by 2002:a17:907:cc05:b0:a26:8554:54b5 with SMTP id uo5-20020a170907cc0500b00a26855454b5mr1304303ejc.18.1703262009353; Fri, 22 Dec 2023 08:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703262009; cv=none; d=google.com; s=arc-20160816; b=H3tYVyFJM6qRAXOpFmntsBszMZfaK+w4P401l2kdQnC/toqmklv7vIZDxgT3wMwGkb p6c79jDqX2TjhZydhgTijREwt7IyZ14kyH+Ip03oVwtWrm2Cid8ESsiGjr+FNH0TZW4A BsCP9p3S3HsW981WjtzohZQOilRBAtXQmfIc7YsNcxIWF01RQrDBXgi/vnxtVqV+pyhA YdVA98km8Ha92A706u6OIS9L9wsA4t8lffYhSacw494KoxZMTVENoHmpOSHkXBvrfPmM 21PKp9M9/r0ORDjmM+9jHZBg6UROhYcLlA2JDcp/vrFSRbTwd+goUk6DXCmR3WgKb/W2 /HXg== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=xmJ1en9GH5SQHwWaS6F8clVDTwVBzeU0gqhBwVsy+mE=; fh=dbsV48zwv4rx9IAfdNCseDzsnMimEerxjrV3Fzyxe48=; b=qEvxr1X1gB3XcdSa97jTlday6wpNu5T2OjlrNzdTBW1pY+ii9cNon+G/qsT3KQ0Sqe kmZuSjPib21XnVh+GFcvGHmaeW6/pm4ByrRUk+zr6rIDGMZ3SjgS3xo2wxxVlThcWMCB AVvrt0Qb/fjrUPkfG8wPVenrCkv3jKAcwc53kHJw7tnP+nW66i6299FPhO6aHO30m8l9 0HlbgJkmOi/8cMWngov6iyUIcfKHbwqN312r7HVwnnfGFBG0bCaDUrSxyT91v74DrVIn oPxyScCK2t3xmt2zwckAv/riFeporVWJEbu42+EdZ1Cu0e7OcEK2yeAtv9tM2/NOKQ3n zyhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZAqu7p39; spf=pass (google.com: domain of linux-kernel+bounces-9878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p18-20020a170906605200b00a2549daae96si1882992ejj.895.2023.12.22.08.20.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 08:20:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZAqu7p39; spf=pass (google.com: domain of linux-kernel+bounces-9878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1E1C51F213AC for ; Fri, 22 Dec 2023 16:20:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0C7324206; Fri, 22 Dec 2023 16:20:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZAqu7p39" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) (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 715AC241E2 for ; Fri, 22 Dec 2023 16:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703261999; x=1734797999; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5sWPu/QE2BZjrUa//e2v0OlJLwu4bI+cyGCK9XgPseo=; b=ZAqu7p39RUJ4dk7isVSrYN/uUrZTkPJIkFYrsDOnvbgOY+8LONx/QuFO HYHwFjG0gY3A6sHaVOhd+hQ4LdC3u/Cuc56j5cJAMsESmoN8Nm2SAovwN sicPkV4IyFJ8NleVtOBSe55X5r1lOoNze4EM4e/7zOdTyt6/eHUfHaW0o Le3fncS8IRUiZCi3oP/R6rEyrGouLMghsqLbJFS7G3IWbCBHAxDRwXOVa 6yhPsg50u5oc/buHnf9O9WUhrRs/so4xJ2eHm+Hp5YhsMEGNy6MR+Ro0G uix6bNFY3NyA95JzaohOkUON/Hv5Ww+9BlSPpLDvUFZ/ORCebkxl5gFob g==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="376273895" X-IronPort-AV: E=Sophos;i="6.04,297,1695711600"; d="scan'208";a="376273895" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 08:19:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="1024233392" X-IronPort-AV: E=Sophos;i="6.04,297,1695711600"; d="scan'208";a="1024233392" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 22 Dec 2023 08:19:56 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 66DB7291; Fri, 22 Dec 2023 18:19:55 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: MyungJoo Ham , Chanwoo Choi Subject: [PATCH v1 1/1] extcon: intel-mrfld: Switch to use dev_err_probe() Date: Fri, 22 Dec 2023 18:19:54 +0200 Message-ID: <20231222161954.2955905-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko --- drivers/extcon/extcon-intel-mrfld.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/extcon/extcon-intel-mrfld.c b/drivers/extcon/extcon-intel-mrfld.c index 2ee738f844ab..8414222d6597 100644 --- a/drivers/extcon/extcon-intel-mrfld.c +++ b/drivers/extcon/extcon-intel-mrfld.c @@ -250,24 +250,18 @@ static int mrfld_extcon_probe(struct platform_device *pdev) return PTR_ERR(data->edev); ret = devm_extcon_dev_register(dev, data->edev); - if (ret < 0) { - dev_err(dev, "can't register extcon device: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "can't register extcon device\n"); ret = devm_request_threaded_irq(dev, irq, NULL, mrfld_extcon_interrupt, IRQF_ONESHOT | IRQF_SHARED, pdev->name, data); - if (ret) { - dev_err(dev, "can't register IRQ handler: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "can't register IRQ handler\n"); ret = regmap_read(regmap, BCOVE_ID, &id); - if (ret) { - dev_err(dev, "can't read PMIC ID: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "can't read PMIC ID\n"); data->id = id; -- 2.43.0.rc1.1.gbec44491f096