Re: [PATCH v2] pcmcia: add error handling for pcmcia_enable_device
From: Andy Shevchenko
Date: Thu Jun 14 2018 - 05:39:45 EST
On Thu, Jun 14, 2018 at 12:23 PM, Zhouyang Jia <jiazhouyang09@xxxxxxxxx> 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