Commit 0f203948 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jiri Kosina
Browse files

HID: amd_sfh: Remove useless DMA-32 fallback configuration

As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t



Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 9b57f458
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -247,13 +247,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
	privdata->mmio = pcim_iomap_table(pdev)[2];
	pci_set_master(pdev);
	rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
	if (rc) {
		rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
	if (rc) {
		dev_err(&pdev->dev, "failed to set DMA mask\n");
		return rc;
	}
	}

	privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct amdtp_cl_data), GFP_KERNEL);
	if (!privdata->cl_data)