linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org, Cai Huoqing <cai.huoqing@linux.dev>,
	kernel@pengutronix.de, dri-devel@lists.freedesktop.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Sekhar Nori <nsekhar@ti.com>
Subject: Re: [PATCH] fbdev: da8xx-fb: Fix error handling in .remove()
Date: Tue, 18 Oct 2022 09:22:32 +0200	[thread overview]
Message-ID: <20221018072232.uodlzz3tzcugl2bo@pengutronix.de> (raw)
In-Reply-To: <7469c557-388a-4917-9810-90b1f341292d@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

On Tue, Oct 18, 2022 at 08:08:49AM +0200, Helge Deller wrote:
> On 10/17/22 21:52, Uwe Kleine-König wrote:
> > Even in the presence of problems (here: regulator_disable() might fail),
> > it's important to unregister all resources acquired during .probe() and
> > disable the device (i.e. DMA activity) because even if .remove() returns
> > an error code, the device is removed and the .remove() callback is never
> > called again later to catch up.
> > 
> > This is a preparation for making platform remove callbacks return void.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> applied.

Great. If you want a Fixes: line, that's:

Fixes: 611097d5daea ("fbdev: da8xx: add support for a regulator")

(expanded Cc: a bit with the people involved there.)

Best regards
Uwe

> > ---
> >   drivers/video/fbdev/da8xx-fb.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> > index ae76a2111c77..11922b009ed7 100644
> > --- a/drivers/video/fbdev/da8xx-fb.c
> > +++ b/drivers/video/fbdev/da8xx-fb.c
> > @@ -1076,7 +1076,8 @@ static int fb_remove(struct platform_device *dev)
> >   	if (par->lcd_supply) {
> >   		ret = regulator_disable(par->lcd_supply);
> >   		if (ret)
> > -			return ret;
> > +			dev_warn(&dev->dev, "Failed to disable regulator (%pe)\n",
> > +				 ERR_PTR(ret));
> >   	}
> > 
> >   	lcd_disable_raster(DA8XX_FRAME_WAIT);
> > 
> > base-commit: 4fe89d07dcc2804c8b562f6c7896a45643d34b2f
> 
> 
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-10-18  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 19:52 [PATCH] fbdev: da8xx-fb: Fix error handling in .remove() Uwe Kleine-König
2022-10-18  6:08 ` Helge Deller
2022-10-18  7:22   ` Uwe Kleine-König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221018072232.uodlzz3tzcugl2bo@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=cai.huoqing@linux.dev \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).