[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 13:27:55 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Kunwu Chan <chentao@...inos.cn>
Cc: andrew@...n.ch, f.fainelli@...il.com, olteanv@...il.com,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Kunwu Chan
<kunwu.chan@...mail.com>
Subject: Re: [PATCH] net: dsa: vsc73xx: Add null pointer check to
vsc73xx_gpio_probe
On Mon, 11 Dec 2023 10:45:49 +0800 Kunwu Chan wrote:
> vsc->gc.label = devm_kasprintf(vsc->dev, GFP_KERNEL, "VSC%04x",
> vsc->chipid);
> + if (!vsc->gc.label) {
> + dev_err(vsc->dev, "Fail to allocate memory\n");
> + return -ENOMEM;
> + }
Don't add error prints on memory allocations.
There will be an OOM splat in the logs.
--
pw-bot: cr
Powered by blists - more mailing lists