summaryrefslogtreecommitdiff
path: root/drivers/crypto/stm32
diff options
context:
space:
mode:
authorLionel Debieve <lionel.debieve@st.com>2018-01-29 17:28:09 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-02-15 18:26:55 +0300
commita3d98b9028395405509bc9e4cbe4b886ebae3c41 (patch)
tree381b3c886c618dc34de8b2a492b5de58718fc95c /drivers/crypto/stm32
parentd3e41b50b46b5ee26793c9c28ccc2d3e45f4f9cc (diff)
downloadlinux-a3d98b9028395405509bc9e4cbe4b886ebae3c41.tar.xz
crypto: stm32/hash - avoid error if maxburst not defined
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 <lionel.debieve@st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/stm32')
-rw-r--r--drivers/crypto/stm32/stm32-hash.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index 89b0c2490d80..37815aa7f5de 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -1413,18 +1413,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)