lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOoeyxU6cnCQz3r8JQC_EAhN0=5GwyhVaw=3MdG_Du1vKA0kdQ@mail.gmail.com>
Date: Tue, 4 Feb 2025 10:55:23 +0800
From: Ming Yu <a0282524688@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: tmyu0@...oton.com, lee@...nel.org, linus.walleij@...aro.org, brgl@...ev.pl, 
	andi.shyti@...nel.org, mkl@...gutronix.de, mailhol.vincent@...adoo.fr, 
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, wim@...ux-watchdog.org, 
	linux@...ck-us.net, jdelvare@...e.com, alexandre.belloni@...tlin.com, 
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org, 
	linux-i2c@...r.kernel.org, linux-can@...r.kernel.org, netdev@...r.kernel.org, 
	linux-watchdog@...r.kernel.org, linux-hwmon@...r.kernel.org, 
	linux-rtc@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v6 4/7] can: Add Nuvoton NCT6694 CANFD support

Dear Simon,

Thank you for reviewing,
I will fix the warning in the next patch.


Best regards,
Ming

Simon Horman <horms@...nel.org> 於 2025年1月23日 週四 下午7:09寫道:
>
> On Thu, Jan 23, 2025 at 05:11:12PM +0800, Ming Yu wrote:
> > This driver supports Socket CANFD functionality for NCT6694 MFD
> > device based on USB interface.
> >
> > Signed-off-by: Ming Yu <a0282524688@...il.com>
>
> ...
>
> > diff --git a/drivers/net/can/usb/nct6694_canfd.c b/drivers/net/can/usb/nct6694_canfd.c
>
> ...
>
> > +static int nct6694_can_get_clock(struct nct6694_can_priv *priv)
> > +{
> > +     struct nct6694_can_information *info;
> > +     struct nct6694_cmd_header cmd_hd = {
> > +             .mod = NCT6694_CAN_MOD,
> > +             .cmd = NCT6694_CAN_INFORMATION,
> > +             .sel = NCT6694_CAN_INFORMATION_SEL,
> > +             .len = cpu_to_le16(sizeof(*info))
> > +     };
> > +     int ret, can_clk;
> > +
> > +     info = kzalloc(sizeof(*info), GFP_KERNEL);
> > +     if (!info)
> > +             return -ENOMEM;
> > +
> > +     ret = nct6694_read_msg(priv->nct6694, &cmd_hd, info);
> > +     if (ret)
> > +             goto exit;
>
> Hi Ming Yu,
>
> This goto will result in the function returning can_clk.
> But can_clk is not initialised until the following line.
>
> Flagged by W=1 builds with clang-19, and by Smatch.
>
> > +
> > +     can_clk = le32_to_cpu(info->can_clk);
> > +
> > +exit:
> > +     kfree(info);
> > +     return can_clk;
> > +}
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ