Correct bug in register read
[tas2770sw-android/tas2770sw-android.git] / tas2770-codec.c
index 2e77cd107088973e2fc7462aa803d1b7818fe6f5..9d75894a67f915645170ed87ef17b6edd6050c0f 100644 (file)
@@ -65,7 +65,11 @@ static unsigned int tas2770_codec_read(struct snd_soc_codec *codec,  unsigned in
                dev_dbg(pTAS2770->dev, "%s, reg: 0x%x, value: 0x%x\n", __func__, reg, value);
 
        mutex_unlock(&pTAS2770->dev_lock);
-       return nResult;
+
+       if(nResult >= 0)
+               return value;
+       else
+               return nResult;
 }