From patchwork Tue Jan 19 13:14:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 73874 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0JDFFaJ023083 for ; Tue, 19 Jan 2010 13:15:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884Ab0ASNPN (ORCPT ); Tue, 19 Jan 2010 08:15:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752948Ab0ASNPL (ORCPT ); Tue, 19 Jan 2010 08:15:11 -0500 Received: from smtp.nokia.com ([192.100.122.233]:36087 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850Ab0ASNPF (ORCPT ); Tue, 19 Jan 2010 08:15:05 -0500 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 o0JDErRW009725; Tue, 19 Jan 2010 15:15:01 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 19 Jan 2010 15:14:59 +0200 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); Tue, 19 Jan 2010 15:14:58 +0200 Received: from localhost.localdomain (esdhcp04088.research.nokia.com [172.21.40.88]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0JDESN2002814; Tue, 19 Jan 2010 15:14:53 +0200 From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , felipe.balbi@nokia.com Subject: [PATCH/USB 16/16] USB: musb: don't dereference NULL tusb_dma in dma_controller_destroy() Date: Tue, 19 Jan 2010 15:14:15 +0200 Message-Id: <1263906855-28341-17-git-send-email-felipe.balbi@nokia.com> X-Mailer: git-send-email 1.6.6.rc0 In-Reply-To: <1263906855-28341-1-git-send-email-felipe.balbi@nokia.com> References: <1263906855-28341-1-git-send-email-felipe.balbi@nokia.com> X-OriginalArrivalTime: 19 Jan 2010 13:14:58.0857 (UTC) FILETIME=[66997990:01CA9909] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index e13c770..1c86809 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -648,7 +648,7 @@ void dma_controller_destroy(struct dma_controller *c) } } - if (!tusb_dma->multichannel && tusb_dma && tusb_dma->ch >= 0) + if (tusb_dma && !tusb_dma->multichannel && tusb_dma->ch >= 0) omap_free_dma(tusb_dma->ch); kfree(tusb_dma);