[PATCH] io-mapping: Indicate mapping failure
Michael J. Ruhl
michael.j.ruhl at intel.com
Tue Jul 21 14:16:41 UTC 2020
Sometimes it is good to know when your mapping failed.
Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about the io-mapping"
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Mike Rapoport <rppt at linux.ibm.com>
Cc: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: stable at vger.kernel.org
Signed-off-by: Michael J. Ruhl <michael.j.ruhl at intel.com>
---
include/linux/io-mapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index 0beaa3eba155..5641e06cbcf7 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -118,7 +118,7 @@ io_mapping_init_wc(struct io_mapping *iomap,
iomap->prot = pgprot_noncached(PAGE_KERNEL);
#endif
- return iomap;
+ return iomap->iomem ? iomap : NULL;
}
static inline void
--
2.21.0
More information about the dri-devel
mailing list