From: Øyvind H. <go...@us...> - 2010-05-06 07:42:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3077f5845f197c5e21fc4ed917722297c74ef754 (commit) from 2fba796e27fe37076380f90aa4df986db2b06685 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3077f5845f197c5e21fc4ed917722297c74ef754 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed May 5 09:32:03 2010 +0200 cfi: fix error handling for protect fn No error was propagated. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 9967652..92b553b 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -3,6 +3,7 @@ * Dom...@gm... * * Copyright (C) 2009 Michael Schwingen * * mi...@sc... * + * Copyright (C) 2010 Ãyvind Harboe <oyv...@zy...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -887,6 +888,7 @@ static int cfi_protect(struct flash_bank *bank, int set, int first, int last) if ((first < 0) || (last < first) || (last >= bank->num_sectors)) { + LOG_ERROR("Invalid sector range"); return ERROR_FLASH_SECTOR_INVALID; } @@ -897,14 +899,12 @@ static int cfi_protect(struct flash_bank *bank, int set, int first, int last) { case 1: case 3: - cfi_intel_protect(bank, set, first, last); + return cfi_intel_protect(bank, set, first, last); break; default: LOG_ERROR("protect: cfi primary command set %i unsupported", cfi_info->pri_id); - break; + return ERROR_FAIL; } - - return ERROR_OK; } /* FIXME Replace this by a simple memcpy() - still unsure about sideeffects */ ----------------------------------------------------------------------- Summary of changes: src/flash/nor/cfi.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |