Commit a3d98b90 authored by Lionel Debieve's avatar Lionel Debieve Committed by Herbert Xu

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: default avatarLionel Debieve <lionel.debieve@st.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d3e41b50
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment