[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180416161845.hxizpjituo6mpvbm@ninjato>
Date: Mon, 16 Apr 2018 18:18:45 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
Cc: Nicholas Mc Guire <der.herr@...r.at>, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [SIL2review] [PATCH] i2c: img-scb: fix PM device usage count
> As far as I've understood the idea is that most "error" return values
> actually are a result of disabled runtime PM, and that should be
> transparent to the caller. Looking at the code, that's what the vast
> majority of callers do - they just ignore the return value of
> pm_runtime_get_sync, and somewhere later have an
> unconditional pm_runtime_put_... call.
>
> So the only issue are callers that don't ignore the pm_runtime_get_sync
> return value, probably because they're having some kind of special
> requirements for error handling. For those, they need to ensure that a
> proper _put_ is done somewhere in the error path.
Is it easily recognizable if the drivers check the error code because
there is a reason or if they do it "out of habit"? For the latter, I
agree that the better fix would be to remove the error check altogether.
Otherwise the code becomes more complex for no reason and even less
people are then brave enough to simplify it later.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists