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

Commit d921620e authored by Tom Lendacky's avatar Tom Lendacky Committed by Herbert Xu
Browse files

crypto: ccp - Remove manual check and set of dma_mask pointer



The underlying device support will set the device dma_mask pointer
if DMA is set up properly for the device.  Remove the check for and
assignment of dma_mask when it is null. Instead, just error out if
the dma_set_mask_and_coherent function fails because dma_mask is null.

Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent bb5530e4
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -174,8 +174,6 @@ static int ccp_platform_probe(struct platform_device *pdev)
	}
	}
	ccp->io_regs = ccp->io_map;
	ccp->io_regs = ccp->io_map;


	if (!dev->dma_mask)
		dev->dma_mask = &dev->coherent_dma_mask;
	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
	if (ret) {
	if (ret) {
		dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret);
		dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret);