Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 393e661d authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu
Browse files

crypto: sahara - checking the wrong variable



There is a typo here.  "dev->hw_link[]" is an array, not a pointer, so
the check is nonsense.  We should be checking recently allocated
"dev->hw_link[0]" instead.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 1bbf6437
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -955,7 +955,7 @@ static int sahara_probe(struct platform_device *pdev)
	dev->hw_link[0] = dma_alloc_coherent(&pdev->dev,
			SAHARA_MAX_HW_LINK * sizeof(struct sahara_hw_link),
			&dev->hw_phys_link[0], GFP_KERNEL);
	if (!dev->hw_link) {
	if (!dev->hw_link[0]) {
		dev_err(&pdev->dev, "Could not allocate hw links\n");
		err = -ENOMEM;
		goto err_link;