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: <20230220043648epcms1p6a85c5c4c11e888e934c715bcc56d4cb8@epcms1p6>
Date:   Mon, 20 Feb 2023 13:36:48 +0900
From:   MyungJoo Ham <myungjoo.ham@...sung.com>
To:     Bumwoo Lee <bw365.lee@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/4] extcon: added extcon_alloc_muex to simplify extcon
 register function

>--------- Original Message ---------
>Sender : 이범우 <bw365.lee@...sung.com>Product S/W Lab(VD)/삼성전자
>Date : 2023-02-17 17:48 (GMT+9)
>Title : [PATCH 3/4] extcon: added extcon_alloc_muex to simplify extcon register function
> 
>The mutual exclusive part is functionalized from extcon_dev_register.
>
>Signed-off-by: Bumwoo Lee <bw365.lee@...sung.com>
>---
> drivers/extcon/extcon.c | 105 ++++++++++++++++++++++------------------
> 1 file changed, 57 insertions(+), 48 deletions(-)
>
>diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
>index 28058a1d2745..93cab4fe178e 100644
>--- a/drivers/extcon/extcon.c
>+++ b/drivers/extcon/extcon.c
>@@ -1125,6 +1125,60 @@ static int extcon_alloc_cables(struct extcon_dev *edev)
>         return 0;
> }
> 
...
>-                if (!edev->attrs_muex) {
>-                        ret = -ENOMEM;
>-                        goto err_muex;
>-                }
...
>+        if (extcon_alloc_muex(edev))
>+                goto err_alloc_muex;

It's not good.
You may return an uninitialized value or 0 when your new function has an error.

Cheers,
MyungJoo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ