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>
Thu, 6 Apr 2023 02:42:38 +0000 (19:42 -0700)
commit7f796d141c07c6d1984d17885d2276980726ba64
tree478222a788e797c24a96bdc2921a441944eb991a
parentdef8574308edbc3bca821fb965e429a2fe5f4971
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
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