Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513732 > unrolled thread
| Started by | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| First post | 2016-11-02 09:30 +0100 |
| Last post | 2016-11-07 16:00 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3] drm: bridge: add DesignWare HDMI I2S audio support Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-11-02 09:30 +0100
Re: [PATCH v3] drm: bridge: add DesignWare HDMI I2S audio support Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-11-07 16:00 +0100
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2016-11-02 09:30 +0100 |
| Subject | Re: [PATCH v3] drm: bridge: add DesignWare HDMI I2S audio support |
| Message-ID | <syZ5L-3QA-3@gated-at.bofh.it> |
On Wed, Nov 02, 2016 at 01:18:35AM +0000, Kuninori Morimoto wrote: > + 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. -- 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.
[toc] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2016-11-07 16:00 +0100 |
| Message-ID | <sATyV-4uf-1@gated-at.bofh.it> |
| In reply to | #1513732 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web