From patchwork Fri Jan 26 17:15:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532907 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 12973C47422 for ; Fri, 26 Jan 2024 17:17:40 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z6qGhxP9qhSyRxDMriMOWwV6eWu0R0m9sukBUTik8NU=; b=zacwVNtHF9Q/G8 KDBznr1g/lfD6zbbUYNG/euE+Ui7Os9rsdV315dEiqszCqKoEWyDtMBlmyuHq400VBPS+VChe1Vqn ASU9WP7J5EAOnYiY/kWGLa7TVunyAstxXMH1Oom5rkb0XeMmNyA0sSs9LOFm6wNvYwo2qSYpePk48 AdVLOYWqZExNrgM9g2iirFKE2O7TBp1wXQgoZsbZMg0YeyFlLwIKr5z9NtsINXf5O0fz7mDwPCOi4 1LJJnXPdgU5NGjW6LUgPR/KEpm43N3BZAdgKEMLtpwXbVxDbJz0rVjBAYdZHHrhNVI3fST9EJc9IR k0W9WgA65n0QGiKjHMmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpZ-00000004qPl-4BPf; Fri, 26 Jan 2024 17:17:30 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPo7-00000004pTC-3mCx for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so9672215e9.3 for ; Fri, 26 Jan 2024 09:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289358; x=1706894158; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8PFQQe5L+S81TOMoMYxe1V5Ktq0fN4GeqljJCUbv5w0=; b=HAXZwM40Vvutr5PSjIfRJYE+R6llOT2ZwL+U3VTgujETMmo5cVheZGEwfl/kiayxtw itjoUb6EalcSb1hhChZbMV6WlYROaZjSCpN8nDZVf6V1AzUPGp0euAknde3lMEV5a34a X8Nc/Ce2Iijo4rdlVfpAEyH02ZfItUNK6qacKr1liRyfG6vbgAabTtZoueLCi/U/6qa0 cDQLoCMtbu8U6GxhN2eKcIoQsWUogK9xRhXH6LFj1JT2RerzGtgoY832bXoIF7DEyNy5 qpdhQRd0KGhN8QxzoSCCt9788OGz77E4dkh0YvN35twt9bkLrxeF6xy86ajv3eio0kNe XWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289358; x=1706894158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8PFQQe5L+S81TOMoMYxe1V5Ktq0fN4GeqljJCUbv5w0=; b=F4m1bwmrv893nwtvfsf94zT6nsxMO8JGrQJLfgWdFMJckLKQqwxWbkjxgpKVVheIcG 7oHmxbEZH8woEIBHlzFNFxGHWHgVd9aaJ5HUFlZ290QjtlqL1aGoyUrPOks2LeT2Evov LHMZrAYrgckh37WPZ7Jdf2LpQDadW5lErb+oBO3WArhMu8pk5pS5gSdLIoEX/sMbK53q 36/ke/x+NIau9Lq+n+e6LJ0bZrexK4rWbTH7dMaRihhlFHY1jq/vzANy5ozRnPFkAjuq Ql9jB3a2LKFveIUmXGqpBicYGHDHst1AclTBZJjqmpfcMEctqIa4XOhSsxx1hYIgovk4 AP3Q== X-Gm-Message-State: AOJu0YxCUSv0IzpIbPMbz5L9DijokMj1EN/w6QZxkO80dTaCOXjx8HMj iFzdeOSIHVt9xqU6qbXg8jkrfnH65aOx7XPMDw/fzQAmKC1mUYfzMWLRUqZIoyg= X-Google-Smtp-Source: AGHT+IEdSfPk+mvqdxvejpoS55NReR4Yc3ryLjfI8k+oBOGs8er5l4B2FW/n7fLGQj8APyuuYj1CgQ== X-Received: by 2002:a05:600c:1d1b:b0:40e:60c3:c327 with SMTP id l27-20020a05600c1d1b00b0040e60c3c327mr97121wms.1.1706289358674; Fri, 26 Jan 2024 09:15:58 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:15:58 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 09/17] spi: s3c64xx: check return code of dmaengine_slave_config() Date: Fri, 26 Jan 2024 17:15:37 +0000 Message-ID: <20240126171546.1233172-10-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091559_961666_D9FFEDA2 X-CRM114-Status: GOOD ( 11.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Check the return code of dmaengine_slave_config(). Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index bbbc4795bcbf..6268790bbcff 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -302,7 +302,9 @@ static int prepare_dma(struct s3c64xx_spi_dma_data *dma, config.dst_maxburst = 1; } config.direction = dma->direction; - dmaengine_slave_config(dma->ch, &config); + ret = dmaengine_slave_config(dma->ch, &config); + if (ret) + return ret; desc = dmaengine_prep_slave_sg(dma->ch, sgt->sgl, sgt->nents, dma->direction, DMA_PREP_INTERRUPT);