Re: [PATCH v1 07/12] mtdparts: use negative error codes

2024-01-03 Thread Michael Nazzareno Trimarchi
Hi On Thu, Dec 28, 2023 at 4:39 PM Alexey Romanov wrote: > > It is bad practice to use such error codes. Error codes > must be negative. > > Also, fastboot code expects that if successful, mtdparts > functions will return a value greater than 0. You can see > fastboot_nand_get_part_info() functio

[PATCH v1 07/12] mtdparts: use negative error codes

2023-12-28 Thread Alexey Romanov
It is bad practice to use such error codes. Error codes must be negative. Also, fastboot code expects that if successful, mtdparts functions will return a value greater than 0. You can see fastboot_nand_get_part_info() functions calls inside getvar_get_part_info(). And use 'return CMD_RET_FAILURE