From patchwork Mon Jul 12 13:38:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 111428 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 o6CDhCTO029702 for ; Mon, 12 Jul 2010 13:43:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755534Ab0GLNnK (ORCPT ); Mon, 12 Jul 2010 09:43:10 -0400 Received: from smtp.nokia.com ([192.100.122.230]:21944 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754607Ab0GLNnJ (ORCPT ); Mon, 12 Jul 2010 09:43:09 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o6CDgmRl000943; Mon, 12 Jul 2010 16:43:04 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Jul 2010 16:42:51 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Jul 2010 16:42:50 +0300 Received: from [172.21.41.123] (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 o6CDgo2V006042; Mon, 12 Jul 2010 16:42:50 +0300 Subject: [PATCH] omap: device: improve errors handling From: Artem Bityutskiy Reply-To: dedekind1@gmail.com To: Tony Lindgen Cc: linux-omap , "ext Menon, Nishanth" , Thara Gopinath Date: Mon, 12 Jul 2010 16:38:07 +0300 Message-ID: <1278941887.16634.85.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 (2.30.2-1.fc13) X-OriginalArrivalTime: 12 Jul 2010 13:42:50.0846 (UTC) FILETIME=[1F0F3FE0:01CB21C8] 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]); Mon, 12 Jul 2010 13:43:12 +0000 (UTC) diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index ea0d659..d2b1609 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -407,7 +407,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;