From patchwork Thu Aug 27 12:19:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 44252 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7RCJJBf016123 for ; Thu, 27 Aug 2009 12:19:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbZH0MTO (ORCPT ); Thu, 27 Aug 2009 08:19:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752135AbZH0MTO (ORCPT ); Thu, 27 Aug 2009 08:19:14 -0400 Received: from smtp.nokia.com ([192.100.122.233]:17391 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803AbZH0MTM (ORCPT ); Thu, 27 Aug 2009 08:19:12 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RCIXDB016597 for ; Thu, 27 Aug 2009 15:18:59 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Aug 2009 15:19:08 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Aug 2009 15:19:06 +0300 Received: from dilbert.research.nokia.com (esdhcp034223.research.nokia.com [172.21.34.223]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RCIx5w003282 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 27 Aug 2009 15:19:01 +0300 Received: from andy by dilbert.research.nokia.com with local (Exim 4.69) (envelope-from ) id 1MgdwT-0000Uy-WD; Thu, 27 Aug 2009 15:19:02 +0300 From: Andy Shevchenko To: linux-omap@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH 7/8] DSPBRIDGE: Check return value Date: Thu, 27 Aug 2009 15:19:00 +0300 Message-Id: <1251375541-1866-8-git-send-email-andy.shevchenko@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1251375541-1866-7-git-send-email-andy.shevchenko@gmail.com> References: <1251375541-1866-1-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-2-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-3-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-4-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-5-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-6-git-send-email-andy.shevchenko@gmail.com> <1251375541-1866-7-git-send-email-andy.shevchenko@gmail.com> X-OriginalArrivalTime: 27 Aug 2009 12:19:07.0231 (UTC) FILETIME=[92FA2EF0:01CA2710] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Andy Shevchenko PROC_GetProcessorId() potentially could return different to DSP_SOK status. We need to check it. Signed-off-by: Andy Shevchenko Acked-by: Fernando Guzman Lugo --- drivers/dsp/bridge/rmgr/drv.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c index 44d7f2d..d21071c 100644 --- a/drivers/dsp/bridge/rmgr/drv.c +++ b/drivers/dsp/bridge/rmgr/drv.c @@ -990,8 +990,12 @@ static DSP_STATUS PrintProcessInformation(void) spin_lock(&pCtxtList->proc_list_lock); list_for_each_entry(proc_obj_ptr, &pCtxtList->processor_list, proc_object) { - PROC_GetProcessorId(proc_obj_ptr, &procID); - if (procID == DSP_UNIT) { + DSP_STATUS status2 = PROC_GetProcessorId(proc_obj_ptr, + &procID); + if (DSP_FAILED(status2)) { + GT_0trace(curTrace, GT_7CLASS, "\n***ERROR:" + "Unable to get Processor Id***\n"); + } else if (procID == DSP_UNIT) { GT_0trace(curTrace, GT_4CLASS, "\nProcess connected to" " DSP Processor\n");