Skip to content
Commit 41130eb8 authored by Ricardo Salveti's avatar Ricardo Salveti Committed by Tom Rini
Browse files

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: default avatarRicardo Salveti <ricardo@foundries.io>
Co-developed-by: default avatarOleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: default avatarOleksandr Suvorov <oleksandr.suvorov@foundries.io>
parent 0892a7e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment