> -----Original Message-----
> From: Alex Williamson <[email protected]>
> Sent: Thursday, August 29, 2019 2:56 AM
> To: Parav Pandit <[email protected]>
> Cc: Jiri Pirko <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected]; linux-
> [email protected]; [email protected]
> Subject: Re: [PATCH v1 1/5] mdev: Introduce sha1 based mdev alias
> 

> > +   /* Allocate and init descriptor */
> > +   hash_desc = kvzalloc(sizeof(*hash_desc) +
> > +                        crypto_shash_descsize(alias_hash),
> > +                        GFP_KERNEL);
> > +   if (!hash_desc)
> > +           goto desc_err;
> > +
> > +   hash_desc->tfm = alias_hash;
> > +
> > +   digest_size = crypto_shash_digestsize(alias_hash);
> > +
> > +   digest = kzalloc(digest_size, GFP_KERNEL);
> > +   if (!digest) {
> > +           ret = -ENOMEM;
> > +           goto digest_err;
> > +   }
> > +   crypto_shash_init(hash_desc);
> > +   crypto_shash_update(hash_desc, uuid, UUID_STRING_LEN);
> > +   crypto_shash_final(hash_desc, digest);
> 
> All of these can fail and many, if not most, of the callers appear that they 
> might
> test the return value.  Thanks,
Right. Changing the signature and honoring return value in v2.

> 
> Alex

Reply via email to