Add error checking to avoid invalid clamp

Change-Id: I427b78588aaa6836744f385b03151723374b8d0e
diff --git a/av1/common/av1_inv_txfm1d.h b/av1/common/av1_inv_txfm1d.h
index 6a4c07c..efc80c4 100644
--- a/av1/common/av1_inv_txfm1d.h
+++ b/av1/common/av1_inv_txfm1d.h
@@ -19,6 +19,7 @@
 #endif
 
 static INLINE int32_t clamp_value(int32_t value, int8_t bit) {
+  if (bit <= 0) return value;  // Do nothing for invalid clamp bit.
   const int64_t max_value = (1LL << (bit - 1)) - 1;
   const int64_t min_value = -(1LL << (bit - 1));
   return (int32_t)clamp64(value, min_value, max_value);