From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbcKBI2c (ORCPT ); Wed, 2 Nov 2016 04:28:32 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:59210 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbcKBI2a (ORCPT ); Wed, 2 Nov 2016 04:28:30 -0400 Date: Wed, 2 Nov 2016 08:27:58 +0000 From: Russell King - ARM Linux To: Kuninori Morimoto Cc: Archit Taneja , Mark Brown , David Airlie , Fabio Estevam , Daniel Vetter , Koji Matsuoka , Thierry Reding , Linux-ALSA , Liam Girdwood , Simon , linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jose Abreu Subject: Re: [PATCH v3] drm: bridge: add DesignWare HDMI I2S audio support Message-ID: <20161102082758.GV1041@n2100.armlinux.org.uk> References: <871syu4r3x.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871syu4r3x.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.