From patchwork Fri Jul 9 13:20:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 111045 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o69DOUUn018664 for ; Fri, 9 Jul 2010 13:24:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755901Ab0GINY2 (ORCPT ); Fri, 9 Jul 2010 09:24:28 -0400 Received: from smtp.nokia.com ([192.100.105.134]:29797 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755848Ab0GINY2 (ORCPT ); Fri, 9 Jul 2010 09:24:28 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o69DODKP001284; Fri, 9 Jul 2010 08:24:24 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Jul 2010 16:24:20 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 Jul 2010 16:24:19 +0300 Received: from sauron.research.nokia.com (esdhcp041123.research.nokia.com [172.21.41.123]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o69DOIVu018584; Fri, 9 Jul 2010 16:24:19 +0300 From: Artem Bityutskiy To: linux-omap@vger.kernel.org Cc: Nishanth Menon , Kevin Hilman , Thara Gopinath , Peter p2 De Schrijver Subject: [PATCH 2/2] omap3: sr: improve errors handling Date: Fri, 9 Jul 2010 16:20:12 +0300 Message-Id: <1278681612-10521-2-git-send-email-dedekind1@gmail.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1278681612-10521-1-git-send-email-dedekind1@gmail.com> References: <1278681612-10521-1-git-send-email-dedekind1@gmail.com> X-OriginalArrivalTime: 09 Jul 2010 13:24:19.0849 (UTC) FILETIME=[099D4F90:01CB1F6A] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 09 Jul 2010 13:24:30 +0000 (UTC) From: Artem Bityutskiy Do not forget to check the 'platform_device_add_data()' error code in 'omap_device_build_ss()'. Signed-off-by: Artem Bityutskiy Acked-by: Nishanth Menon --- arch/arm/plat-omap/omap_device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index f2bd2e2..e8da192 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -414,7 +414,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, od->pdev.num_resources = res_count; od->pdev.resource = res; - platform_device_add_data(&od->pdev, pdata, pdata_len); + ret = platform_device_add_data(&od->pdev, pdata, pdata_len); + if (ret) + goto odbs_exit4; od->pm_lats = pm_lats; od->pm_lats_cnt = pm_lats_cnt;