Commit 6c810f90140a3274181c4093d5dd4c88c6fff0b4
Committed by
Artem Bityutskiy
1 parent
ecfe57b796
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
mtg: docg3: potential divide by zero in doc_write_oob()
If we set oobdelta to zero then we will either return -EINVAL or hit a divide (modulus) by zero on the next line when we check "(ooblen % oobdelta)". It's better to just return -EINVAL here instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/mtd/devices/docg3.c