lkml.org 
[lkml]   [2017]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@oracle.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

\
 
 \ /
  Last update: 2017-07-30 18:20    [W:1.541 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site