소스 검색

mtd: add missing breaks in a switch

On platforms supporting both: TRX and Seama calling "fixtrx" was
resulting in trying to fix Seama as well.

Signed-off-by: Rafał Miłecki <[email protected]>
rmilecki 9 년 전
부모
커밋
320641585b
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      package/system/mtd/src/mtd.c

+ 2 - 0
package/system/mtd/src/mtd.c

@@ -969,10 +969,12 @@ int main (int argc, char **argv)
 			if (mtd_fixtrx) {
 			if (mtd_fixtrx) {
 				mtd_fixtrx(device, offset);
 				mtd_fixtrx(device, offset);
 			}
 			}
+			break;
 		case CMD_RESETBC:
 		case CMD_RESETBC:
 			if (mtd_resetbc) {
 			if (mtd_resetbc) {
 				mtd_resetbc(device);
 				mtd_resetbc(device);
 			}
 			}
+			break;
 		case CMD_FIXSEAMA:
 		case CMD_FIXSEAMA:
 			if (mtd_fixseama)
 			if (mtd_fixseama)
 				mtd_fixseama(device, 0);
 				mtd_fixseama(device, 0);