crypto/dpaa_sec: improve the error checking