Merge remote-tracking branch 'public/pr/1965' into development
diff --git a/ChangeLog b/ChangeLog
index 1501d33..5d72364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,9 @@
      Fixes #1954.
    * Fix memory leak and free without initialization in pk_encrypt
      and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128.
+   * Remove redundant else statement, which is not readable, and the positive
+     path in the if statement results in exiting the funciton. Raised by irwir
+     in #1776.
 
 Changes
    * Copy headers preserving timestamps when doing a "make install".
diff --git a/library/ecp.c b/library/ecp.c
index 68c6f49..9e2c085 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -1897,7 +1897,6 @@
             mbedtls_mpi_get_bit( d, 1 ) != 0 ||
             mbedtls_mpi_bitlen( d ) - 1 != grp->nbits ) /* mbedtls_mpi_bitlen is one-based! */
             return( MBEDTLS_ERR_ECP_INVALID_KEY );
-        else
 
         /* see [Curve25519] page 5 */
         if( grp->nbits == 254 && mbedtls_mpi_get_bit( d, 2 ) != 0 )