lkml.org 
[lkml]   [2018]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] pcmcia: add error handling for pcmcia_enable_device
On Thu, Jun 14, 2018 at 12:23 PM, Zhouyang Jia <jiazhouyang09@gmail.com> wrote:
> When pcmcia_enable_device fails, the lack of error-handling code may
> cause unexpected results.

What results?
You need to elaborate this.,

> This patch adds error-handling code after calling pcmcia_enable_device.

> + int ret;
> +
> + ret = pcmcia_enable_device(link);
> + if (ret)
> + return -ENODEV;

And why not to return ret?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-06-14 11:40    [W:0.049 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site