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] [day] [month] [year] [list]
Date:   Sun, 30 Jul 2017 19:19:22 +0300
From:   Gilad Ben-Yossef <gilad@...yossef.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-crypto@...r.kernel.org,
        driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>,
        Suniel Mahesh <sunil.m@...hveda.org>,
        Ofir Drang <ofir.drang@....com>
Subject: Re: [PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for
 map, unmap

On Thu, Jul 27, 2017 at 10:48 PM, Dan Carpenter
<dan.carpenter@...cle.com> wrote:
> On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote:
>> +     new_drvdata->cc_base = devm_ioremap_resource(&plat_dev->dev,
>> +                                                  req_mem_cc_regs);
>> +     if (IS_ERR(new_drvdata->cc_base)) {
>> +             rc = PTR_ERR(new_drvdata->cc_base);
>>               goto init_cc_res_err;
>                 ^^^^^^^^^^^^^^^^^^^^
> (This code was in the original and not introduced by the patch.)
>
> Ideally, the goto name should say what the goto does.  In this case it
> does everything.  Unfortunately trying to do everything is very
> complicated so obviously the error handling is going to be full of bugs.

Thank you. This review is most helpful. I've added a patch to address
the specific
issues you've raised.

I also see some additional places that can get similar treatment to
both what you
suggested as well as what Suneil has done. I'll address those in
follow up patches.

Gilad



-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ