Re: [PATCH] staging: ccree: Uninitialized return in ssi_ahash_import()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 5, 2017 at 4:37 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> The return value isn't initialized on some success paths.
>
> Fixes: c5f39d07860c ("staging: ccree: fix leak of import() after init()")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
> index a2e8a9d32e00..3855c42e61af 100644
> --- a/drivers/staging/ccree/ssi_hash.c
> +++ b/drivers/staging/ccree/ssi_hash.c
> @@ -1823,7 +1823,7 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
>         struct device *dev = drvdata_to_dev(ctx->drvdata);
>         struct ahash_req_ctx *state = ahash_request_ctx(req);
>         u32 tmp;
> -       int rc;
> +       int rc = 0;
>
>         memcpy(&tmp, in, sizeof(u32));
>         if (tmp != CC_EXPORT_MAGIC) {

Acked-by: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx>

And thanks!
Gilad

-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux