From patchwork Wed Apr 17 16:55:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13633656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E91F6C04FFF for ; Wed, 17 Apr 2024 16:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c3mvJCZlYkDqSKr3/aelpEUWP/q5f5Askp5fL4Js/kI=; b=rGj04CKshkdOA1 HCOoXw54YIIpjKa/4kvfDeCAEgi4534yPUzuaRArK6ijpOoydtQgVwq7Q3UHcXk8K6Qzoy7O26SPU +Gvq+MDDYZZathoi1qMDyh2gERLjv8kJ8eLWviNZTMStiNdxmjLRy9c0DHcjaMAFWpaYQ789Pa6mZ 9/724B89x8/hCrQa2Xdg7kGsRAs47GHU9ywFkC+BGA2XlM7cykpdsMJFZecpwrNbLyMNlYbPIS4aV 5F33EU2Fum1v37tjQIdJt5qomEjFg4A/8++jzWYfrfphZ3WMs4/7ck+74gArx9yUT8hckHORuDNgr 3JnXt6/3RpetzaP076Hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx8bB-0000000GtyC-1BbY; Wed, 17 Apr 2024 16:57:29 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx8b1-0000000GtsS-33eS for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 16:57:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713373040; x=1744909040; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bgWGwCLui9Z4FRfsi9Q01Jk+7wL6L7PwnwPlqb0UfpE=; b=exA3phueqNqtbv4PmNq+4L1HK82SrAhf5hVkB4bK3TMXNcXDeMByRZ2w mWBDqEAvV4RlbptjTgVmSxOf2w3EdyA36pwP3sCQRTP9Y3IcTl91oK4zy AqfIHakUTSTD/GfLdnnYfxkWw1zamlJUrT+Z7YToksxwTrIX+QvovKV0H 7ErgHfJp9wAp16hTq35agkXwBMKiHW5KiDjxASNd7yLOEOcavwA6udwZI zD6uCXqjGPZCBG8ukMg77z1QxRj5CG0dBEqGADjRpUg4DsI/6bKeB4hRf IXHsKxZvqnNPaN5AaxPgt9KybNd9Znj+sCVHmV1NO0h7Ko1i8PbZ/waGv Q==; X-CSE-ConnectionGUID: 3YbUXwJFTG+DSikZuaWh0g== X-CSE-MsgGUID: a8Q4kDpSQwuNH2UqOrb40Q== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8737031" X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="8737031" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2024 09:57:18 -0700 X-CSE-ConnectionGUID: rq6sC2tpRaSZZU4PxKytyQ== X-CSE-MsgGUID: 5SSBCHV2QnKQii/ZGQR1gw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="22571643" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 17 Apr 2024 09:57:16 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BB892169; Wed, 17 Apr 2024 19:57:11 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 5/5] mmc: atmel-mci: Switch to use dev_err_probe() Date: Wed, 17 Apr 2024 19:55:17 +0300 Message-ID: <20240417165708.2965612-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com> References: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_095719_875190_EA81E7F6 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aubin Constans , Ulf Hansson , Alexandre Belloni , Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/atmel-mci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 3ae17b8584a2..c4502482d967 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2548,7 +2548,7 @@ static int atmci_probe(struct platform_device *pdev) } if (!nr_slots) { - dev_err(dev, "init failed: no slot defined\n"); + dev_err_probe(dev, ret, "init failed: no slot defined\n"); goto err_init_slot; } @@ -2557,8 +2557,7 @@ static int atmci_probe(struct platform_device *pdev) &host->buf_phys_addr, GFP_KERNEL); if (!host->buffer) { - ret = -ENOMEM; - dev_err(dev, "buffer allocation failed\n"); + ret = dev_err_probe(dev, -ENOMEM, "buffer allocation failed\n"); goto err_dma_alloc; } }