[PATCH v1 4/5] efi/esrt: Drop duplicate check for size parameter of memremap()
From: Andy Shevchenko
Date: Fri Nov 15 2019 - 13:00:59 EST
Since memremap() returns NULL pointer for size = 0, there is no need
to duplicate this check in the callers.
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/firmware/efi/esrt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
index 2762e0662bf4..dce56a4c4011 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
@@ -381,7 +381,7 @@ static int __init esrt_sysfs_init(void)
int error;
pr_debug("esrt-sysfs: loading.\n");
- if (!esrt_data || !esrt_data_size)
+ if (!esrt_data)
return -ENOSYS;
esrt = memremap(esrt_data, esrt_data_size, MEMREMAP_WB);
--
2.24.0