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: <82673cff-6571-43fc-9b64-3af2c72593c3@kili.mountain>
Date:   Tue, 18 Apr 2023 08:45:20 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Wang Zhang <silver_code@...t.edu.cn>
Cc:     Peter Korsgaard <peter@...sgaard.com>,
        Andrew Lunn <andrew@...n.ch>,
        hust-os-kernel-patches@...glegroups.com, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] i2c: ocores: add missing unwind goto in
 `ocores_i2c_probe`

On Tue, Apr 18, 2023 at 01:38:13PM +0800, Wang Zhang wrote:
> Smatch Warns:
> drivers/i2c/busses/i2c-ocores.c:701 ocores_i2c_probe() warn:
> missing unwind goto?
> 
> The error handling code after the err_clk label should be executed to
> release any resources that were allocated for the clock if a negative
> error code returned after platform_get_irq_optional.
> 
> Fix this by changing the direct return to `goto err_clk`. 
> 
> Signed-off-by: Wang Zhang <silver_code@...t.edu.cn>
> ---
> v2->v3: the first patch had issues. Just do a much simpler fix. No need 
> to add the check. clk_disable_unprepare() has checks for error pointer 
> and NULL already.
> v1->v2: change `ocores_i2c_of_probe` to use `devm_clk_get_enabled()`

I meant send it to the public mailing list.  Don't add the other
comments which are related to discussions on this list.  Just say that
the public 1 was buggy and the this new v2 patch is simpler.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ