lkml.org 
[lkml]   [2016]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] drm: bridge: add DesignWare HDMI I2S audio support
On Mon, Nov 07, 2016 at 03:50:00AM +0000, Kuninori Morimoto wrote:
>
> Hi Russell
>
> > > + platform = platform_device_register_full(&pdevinfo);
> > > + if (IS_ERR_OR_NULL(platform))
> > > + return PTR_ERR(platform);
> >
> > This is wrong. If platform is NULL, PTR_ERR() will return zero, which
> > will be interpreted as success. Please, avoid using IS_ERR_OR_NULL(),
> > it leads to exactly this kind of cockup - and it's unnecessary here
> > because platform_device_register_full() does not return NULL.
>
> Thank you for your feedback.
> Before sending v4 patch, I would like to confirm. Do you meand this ?
> # use IS_ERR() instead of IS_ERR_OR_NULL()
>
> platform = platform_device_register_full(&pdevinfo);
> if (IS_ERR(platform))
> return PTR_ERR(platform);

Yes, that's exactly correct.

--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

\
 
 \ /
  Last update: 2016-11-07 15:57    [W:0.058 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site