Re: [PATCH] drm: shmob_drm: Check clk_prepare_enable() return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 04, 2013 at 02:38:21AM +0100, Laurent Pinchart wrote:
> Hi Thierry,
> 
> On Tuesday 03 December 2013 10:59:24 Thierry Reding wrote:
> > On Mon, Dec 02, 2013 at 01:52:20AM +0100, Laurent Pinchart wrote:
> > [...]
> > 
> > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
> > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
> > [...]
> > 
> > > @@ -170,7 +178,9 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc
> > > *scrtc)
> > >  		return;
> > >  	
> > >  	/* Enable clocks before accessing the hardware. */
> > > -	shmob_drm_clk_on(sdev);
> > > +	ret = shmob_drm_clk_on(sdev);
> > > +	if (ret < 0)
> > > +		return;
> > 
> > Perhaps this should be printing an error or using WARN_ON()? Otherwise
> > it might be very difficult to diagnose what's going wrong.
> 
> That's a good point. In practice, as the driver always uses a Renesas SoC MSTP 
> clock, the clock code will print a message to the kernel log though, so I'm 
> not sure whether we should duplicate that here. If you think we should I'll 
> submit a new patch.

Is that one of the clocks implemented in drivers/sh/clk? There don't
seem to be any error messages in the clk_enable() implementation.

Thierry

Attachment: pgpVeFBnt6l1a.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux