On Tue, May 05, 2026 at 12:37:05AM -0700, Rosen Penev wrote: > Use a flexible array member to combine allocations. > > Add __counted_by for extra runtime analysis. > > Signed-off-by: Rosen Penev <[email protected]> > --- > v2: add check for of_property_read_u32 > drivers/crypto/talitos.c | 19 +++++++------------ > drivers/crypto/talitos.h | 5 +++-- > 2 files changed, 10 insertions(+), 14 deletions(-) > > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > index bc61d0fe3514..e1f009684216 100644 > --- a/drivers/crypto/talitos.c > +++ b/drivers/crypto/talitos.c > @@ -3409,14 +3409,20 @@ static int talitos_probe(struct platform_device > *ofdev) > struct device *dev = &ofdev->dev; > struct device_node *np = ofdev->dev.of_node; > struct talitos_private *priv; > + unsigned int num_channels; > int i, err; > int stride; > struct resource *res; > > - priv = devm_kzalloc(dev, sizeof(struct talitos_private), GFP_KERNEL); > + if (of_property_read_u32(np, "fsl,num-channels", &num_channels)) > + num_channels = 0;
Does this driver still work with zero channels? It should just fail the probe. Thanks, -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

