dmapool: remove checks for dev == NULL
authorTony Battersby <tonyb@cybernetics.com>
Thu, 26 Jan 2023 21:51:15 +0000 (13:51 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 6 May 2023 17:33:36 +0000 (10:33 -0700)
commit67a540c60c39d052d9599aa9909023152200a707
tree62316d1cbcc7bf9e1e8c75540efabbd018db3490
parent418d5c98319f67b9ae651babea031b5394425c18
dmapool: remove checks for dev == NULL

dmapool originally tried to support pools without a device because
dma_alloc_coherent() supports allocations without a device.  But nobody
ended up using dma pools without a device, and trying to do so will result
in an oops.  So remove the checks for pool->dev == NULL since they are
unneeded bloat.

[kbusch@kernel.org: add check for null dev on create]
Link: https://lkml.kernel.org/r/20230126215125.4069751-3-kbusch@meta.com
Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup")
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/dmapool.c