diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-20 12:51:41 +0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-08-21 15:28:06 +0400 |
commit | 393e661d6167c1b7444704191ea1d01aa3447894 (patch) | |
tree | 6e88ed7d3c478a7c8eaf72fe945cb75811219dac /drivers/crypto/sahara.c | |
parent | 1bbf643705c3f85f3fa2325807afae260f755f9a (diff) | |
download | linux-393e661d6167c1b7444704191ea1d01aa3447894.tar.xz |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/sahara.c')
-rw-r--r-- | drivers/crypto/sahara.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index b076d8110785..d7bb8bac36e9 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -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; |