Avoid returning an error in erofs_write_device_table() if a new device slot table hasn't been allocated. Rationale is to allow erofs_importer_flush_all() to succeed when dealing with images with pre-existing device slots.
Signed-off-by: Jonathan Calmels <[email protected]> --- lib/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/super.c b/lib/super.c index a203f96..d38396f 100644 --- a/lib/super.c +++ b/lib/super.c @@ -392,7 +392,7 @@ int erofs_write_device_table(struct erofs_sb_info *sbi) if (!sbi->extra_devices) goto out; if (!bh) - return -EINVAL; + goto out; pos = erofs_btell(bh, false); if (pos == EROFS_NULL_ADDR) { -- 2.53.0
