openocd: fix simple cases of Yoda condition
[fw/openocd] / src / target / nds32_v3.c
index f9cd47a40a8fd60ea33c5ded8bb4451d2c13fb3d..fde86d6e83b62d7538bbc708f3ee28eb352aa430 100644 (file)
@@ -310,7 +310,7 @@ static int nds32_v3_add_breakpoint(struct target *target,
                return ERROR_OK;
        } else if (breakpoint->type == BKPT_SOFT) {
                result = nds32_add_software_breakpoint(target, breakpoint);
-               if (ERROR_OK != result) {
+               if (result != ERROR_OK) {
                        /* auto convert to hardware breakpoint if failed */
                        if (nds32->auto_convert_hw_bp) {
                                /* convert to hardware breakpoint */