Re: [PATCH 2/2] serdev: ttyport: add missing open() error handling

From: Rob Herring
Date: Tue Oct 17 2017 - 12:09:24 EST


On Mon, Oct 16, 2017 at 8:06 AM, Johan Hovold <johan@xxxxxxxxxx> wrote:
> Add missing error handling for tty-driver open() which may fail (e.g. if
> resource allocation fails or if a port is being disconnected).
>
> Note that close() must be called also in case of failed open() and that
> the operation sanity check is amended to catch buggy drivers.

That's a very odd pattern. Wouldn't a must_check annotation be enough?

Rob