--- zzzz-none-000/linux-4.1.52/drivers/mtd/ubi/vmt.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/mtd/ubi/vmt.c 2022-03-02 11:37:13.000000000 +0000 @@ -413,6 +413,10 @@ struct ubi_device *ubi = vol->ubi; int i, err, vol_id = vol->vol_id, reserved_pebs = vol->reserved_pebs; +#if defined(CONFIG_BCM_KF_KERN_WARNING) + err = -EPERM; +#endif + dbg_gen("remove device %d, volume %d", ubi->ubi_num, vol_id); ubi_assert(desc->mode == UBI_EXCLUSIVE); ubi_assert(vol == ubi->volumes[vol_id]); @@ -458,6 +462,11 @@ if (!no_vtbl) self_check_volumes(ubi); +#if defined(CONFIG_BCM_KF_KERN_WARNING) + if (err == -EPERM) { + printk("vmt.c: ubi_remove_volume really returned an undefined error\n"); + } +#endif return err; out_err: