fs: fat: check for buffer size before reading blocks
This patch optimizes the commit mentioned below by avoiding running a set of commands which are useless in the case when size < mydata->sect_size and sect_count would be 0. Fixes: 5b3ddb17 ("fs/fat/fat.c: Do not perform zero block reads if there are no blocks left") Signed-off-by:Ricardo Salveti <ricardo@foundries.io> Co-developed-by:
Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by:
Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Loading
Please register or sign in to comment