Received: by 10.223.176.5 with SMTP id f5csp2940137wra; Mon, 29 Jan 2018 06:32:40 -0800 (PST) X-Google-Smtp-Source: AH8x226/c7Lob37FQxk0Poi7XKUnPa0IoNgIbbOiTfyCDQg/vLjXUL4gPhKHQfrahkbQ5+/I18jG X-Received: by 10.98.200.78 with SMTP id z75mr27075593pff.114.1517236359970; Mon, 29 Jan 2018 06:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517236359; cv=none; d=google.com; s=arc-20160816; b=fUI993Eb/3fFdz00H1wH2kNKFsZMSbpdgCau+2RX8xY/aYilfB1SUEj8L2reUyODTE KpAd81yMkRtDhN3Lfm9lsUlgpZ70w8vM/a0AZBMkw6orZmI0NiTIpfhxtmO9w+Epm4VN iKQ2GeihYNaiLedWIC9b9wrtFDcZW05tElp6cUeOt0JOwJPrt4mPpVJpZbvlbKobkmpH bCfJCnaxY6KkWevG/71Ys40oJYIRQnkSfyCtu7VPbnFf6g9a2xov4U+tblYSXKESZSZI hO2cylYjP1CydCqAC7B3tiQrPLBo0i8fT6svIfFoJ+3fdv8jipaR5sfrnfLJjYJI98sG 11/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=c6QN0bTURRQ5OSRuV7RjsoQRERTDHNtSubcrqK3gyZ0=; b=bMhUezW6UkoMmX0OCUnM0bpUKIE5F9llH/WLMwW8npxlXG9KOMEEEzbSuApMyLwDfB 6O9Vl4UNw2e54qpv38Ue/If9PWh9j1Af7mPf5xlGF0vQYu55T+2NL0z1keNPvZ/SwZz/ HyEDYGQwNKjCLw6y0Skmg1wSVGuAyj/qvESdYjgEX0lnMHRVQ4esMZsmrxZ/M2RuAx7x UEpawjqLrB+oOnoefAhAuT+7mU3BQbLg044NpB7eTX9hS6oOUfoCl0iXUcukHiMJBYFH K79Pf5+XHczRTINZM5fNyBCIU/d+D/sKAxWtzy7BAFbB68DhvkFoVIQMuQS+BtlTwi42 +b9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4-v6si9227281plo.347.2018.01.29.06.32.25; Mon, 29 Jan 2018 06:32:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbeA2O37 (ORCPT + 99 others); Mon, 29 Jan 2018 09:29:59 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:8665 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbeA2O36 (ORCPT ); Mon, 29 Jan 2018 09:29:58 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0TETEKL016705; Mon, 29 Jan 2018 15:29:31 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2ft0sq9ry6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 29 Jan 2018 15:29:31 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EBAC234; Mon, 29 Jan 2018 14:29:30 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CF4282944; Mon, 29 Jan 2018 14:29:30 +0000 (GMT) Received: from lmecxl0602.lme.st.com (10.75.127.46) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 29 Jan 2018 15:29:30 +0100 From: Lionel Debieve To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue , , , CC: Benjamin Gaignard , Fabien Dessenne , Ludovic Barre , Lionel Debieve Subject: [PATCH 1/3] crypto: stm32/hash: avoid error if maxburst not defined Date: Mon, 29 Jan 2018 15:28:09 +0100 Message-ID: <20180129142811.13273-2-lionel.Debieve@st.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180129142811.13273-1-lionel.Debieve@st.com> References: <20180129142811.13273-1-lionel.Debieve@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-29_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lionel Debieve dma-maxburst is an optional value and must not return error in case of dma not used (or max-burst not defined). Signed-off-by: Lionel Debieve --- drivers/crypto/stm32/stm32-hash.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 4ca4a264a833..73cdc3b4dca8 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -1404,18 +1404,19 @@ MODULE_DEVICE_TABLE(of, stm32_hash_of_match); static int stm32_hash_get_of_match(struct stm32_hash_dev *hdev, struct device *dev) { - int err; - hdev->pdata = of_device_get_match_data(dev); if (!hdev->pdata) { dev_err(dev, "no compatible OF match\n"); return -EINVAL; } - err = of_property_read_u32(dev->of_node, "dma-maxburst", - &hdev->dma_maxburst); + if (of_property_read_u32(dev->of_node, "dma-maxburst", + &hdev->dma_maxburst)) { + dev_info(dev, "dma-maxburst not specified, using 0\n"); + hdev->dma_maxburst = 0; + } - return err; + return 0; } static int stm32_hash_probe(struct platform_device *pdev) -- 2.15.1