We generalize the existing decoding algorithms by error location for BCH and algebraic-geometric codes to arbitrary linear codes. We investigate the number of dependent sets of error positions. A received word with an independent set of error positions can be corrected.