This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/657

-- gerrit

commit d8df3712ad5515bf2bc3b3741db8c4325bd73ed7
Author: Spencer Oliver <[email protected]>
Date:   Tue May 22 12:33:40 2012 +0100

    stlink: check read_reg result
    
    Change-Id: I284824aa6f5eae8f6e910a482e9f7435e649fc0d
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/target/stm32_stlink.c b/src/target/stm32_stlink.c
index 9afaae0..b6d4ffa 100644
--- a/src/target/stm32_stlink.c
+++ b/src/target/stm32_stlink.c
@@ -111,6 +111,8 @@ static int stm32_stlink_load_core_reg_u32(struct target 
*target,
                 * it was removed from r1 docs, but still works.
                 */
                retval = stlink_if->layout->api->read_reg(stlink_if->fd, 20, 
value);
+               if (retval != ERROR_OK)
+                       return retval;
 
                switch (num) {
                case ARMV7M_PRIMASK:

-- 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to