Skip to contentSkip to conversation

UBI: fix errorhandling in ioctl

PATCH In review Alexander Schmidt 2 participants 2 messages Dec 18, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBI: fix errorhandling in ioctl

Hi,

the double declaration of "int err" makes the ioctl() for resizing volumes always return 0, even if errors occured during the resizing procedure.

I hope the patch applies this time, i double checked it...

Kind regards,
Alexander Schmidt

---

drivers/mtd/ubi/cdev.c +1 -1
index 469cc47..be304dc 100644
@@ -824,7 +824,7 @@ out_free:
 	/* Re-size volume command */
 	case UBI_IOCRSVOL:
 	{
-		int err, rem, pebs;
+		int rem, pebs;
 		uint64_t tmp;
 		const struct ubi_vtbl_vtr *vtr;
 		struct ubi_rsvol_req req;
#1 lore raw

Hello Alexander,

Quoted 3 lines · Alexander Schmidt

the double declaration of "int err" makes the ioctl() for resizing volumes always return 0, even if errors occured during the resizing procedure.

Thanks.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)