[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <16e141fc3d9cce0f46718ffb9e861e5d3b9da6ab.camel@igalia.com>
Date: Wed, 31 Aug 2022 13:01:38 +0200
From: Samuel Iglesias Gonsálvez
<siglesias@...lia.com>
To: Bo Liu <liubo03@...pur.com>, jens.taprogge@...rogge.org,
gregkh@...uxfoundation.org
Cc: industrypack-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipack: Check dev_set_name() return value
Hi Bo,
Thanks for your contribution!
Patch is,
Acked-by: Samuel Iglesias Gonsalvez <siglesias@...lia.com>
Greg, Would you mind picking this patch series through your char-misc
tree?
Thanks!
Sam
On Fri, 2022-08-05 at 05:10 -0400, Bo Liu wrote:
> It's possible that dev_set_name() returns -ENOMEM, catch and handle
> this.
>
> Signed-off-by: Bo Liu <liubo03@...pur.com>
> ---
> drivers/ipack/ipack.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
> index b1c3198355e7..74d449858a61 100644
> --- a/drivers/ipack/ipack.c
> +++ b/drivers/ipack/ipack.c
> @@ -429,8 +429,11 @@ int ipack_device_init(struct ipack_device *dev)
> dev->dev.bus = &ipack_bus_type;
> dev->dev.release = ipack_device_release;
> dev->dev.parent = dev->bus->parent;
> - dev_set_name(&dev->dev,
> + ret = dev_set_name(&dev->dev,
> "ipack-dev.%u.%u", dev->bus->bus_nr, dev->slot);
> + if (ret)
> + return ret;
> +
> device_initialize(&dev->dev);
>
> if (dev->bus->ops->set_clockrate(dev, 8))
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists