Browse Source

target: catch dap_lookup read error

Issue found by clang-3.1

Change-Id: I2e922ec83117e75db5bec1e82edaa75a9e6e7464
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/778
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
tags/v0.6.0-rc2
Spencer Oliver 11 years ago
committed by Freddie Chopin
parent
commit
78f4f95648
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/target/arm_adi_v5.c

+ 2
- 0
src/target/arm_adi_v5.c View File

@@ -1265,6 +1265,8 @@ int dap_lookup_cs_component(struct adiv5_dap *dap, int ap,
retval = mem_ap_read_atomic_u32(dap,
(component_base & 0xfffff000) | 0xfcc,
&devtype);
if (retval != ERROR_OK)
return retval;
if ((devtype & 0xff) == type) {
*addr = component_base;
retval = ERROR_OK;


Loading…
Cancel
Save