On Mon, Jul 10, 2006 at 06:00:18PM +1200, Michal Ludvig wrote: > > I wrote the code before applying your last patch when it simply checked > for !0 [if (alg->cra_init && alg->cra_init(tfm)) ...] so I didn't bother > to return something meaningful.
As a rule whenever a non-zero return value is used to indicate error you should always return an errno value. This is so that if the caller then has to return the error as part of a pointer using ERR_PTR (which is indeed the case here), it doesn't get turned into a non-error. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html