fix bug : when reading coefficient from calibration firmware, the second and followin...
authorPeter Li <a0220410@ti.com>
Thu, 27 Apr 2017 14:45:25 +0000 (22:45 +0800)
committerPeter Li <a0220410@ti.com>
Thu, 27 Apr 2017 14:45:25 +0000 (22:45 +0800)
tas2557-core.c

index c1acbc561480db60cb3dc2bda888d453ac4b0e80..ef337de9f3011345bed402d53f52e7d4623a5dea 100755 (executable)
@@ -1872,12 +1872,14 @@ int tas2557_get_Cali_prm_r0(struct tas2557_priv *pTAS2557, int *prm_r0)
                                                bFound = true;
                                                goto end;
                                        }
-                                       nn++;
+                                       nn += 2;
                                        nn += ((len - 1) / 4);
                                        if ((len - 1) % 4)
                                                nn++;
-                               } else
+                               } else {
                                        dev_err(pTAS2557->dev, "%s, format error %d\n", __func__, nOffset);
+                                       break;
+                               }
                        }
                }
        }