summaryrefslogtreecommitdiffstats
path: root/lib/swiotlb.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-04-05 14:19:11 +0300
committerChristoph Hellwig <hch@lst.de>2018-05-07 07:15:41 +0200
commit698733fbdfcd2f2daaa992ca507a2dad7363c9a8 (patch)
treece79f626543b32aacf55bf7999894da1a01a0e25 /lib/swiotlb.c
parent3d6ce86ee79465e1b1b6e287f8ea26b553fc768e (diff)
downloadlinux-698733fbdfcd2f2daaa992ca507a2dad7363c9a8.tar.gz
linux-698733fbdfcd2f2daaa992ca507a2dad7363c9a8.tar.bz2
linux-698733fbdfcd2f2daaa992ca507a2dad7363c9a8.zip
swiotlb: remove an unecessary NULL check
Smatch complains here: lib/swiotlb.c:730 swiotlb_alloc_buffer() warn: variable dereferenced before check 'dev' (see line 716) "dev" isn't ever NULL in this function so we can just remove the check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r--lib/swiotlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 12fbaa445637..bd1e0c5ba1b8 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -727,7 +727,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
out_unmap:
dev_warn(dev, "hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n",
- (unsigned long long)(dev ? dev->coherent_dma_mask : 0),
+ (unsigned long long)dev->coherent_dma_mask,
(unsigned long long)*dma_handle);
/*