From patchwork Fri Dec 13 10:47:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 22321 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D7B823FBA for ; Fri, 13 Dec 2013 10:47:43 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf6385597oag.1 for ; Fri, 13 Dec 2013 02:47:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JplBfUys/jwwERBnfTYAYQ1kKNFnIiQep46tw3V85rA=; b=KU2S+xlSGb7HpCRB4yjndLQsHuUsw69eYSz/PM7ANTfn55J8WMQdUeGMAsXjwzgwAz Oy6HxjbSBwvRcABTn58VPyIAJ0IZDmKme17aBDv1EYyM7BXfQzndCrE+n9C6pD0N34/S YixK4vcGcCq8hZiK7hKvZCfPunYesYDAbuJQYzT+lnkyikvsT3I1zy14h7LGJ0goMDSR MbZ7BbTXO0itXXOdmxDlpTjmKACTW8g/oz+HnjnZfmp0accVtLzxue3/CZiUxyKhETDl 8vv630D74BzS8v1TNBSXFcxGflWXdgXocRDmhJlDBg0tSAWBlENp+LF2fP5GejGMoFMF 2xsA== X-Gm-Message-State: ALoCoQlTbZoomr9me3PsR5fMua2eLmXy95F6EW6HP8eQYKQm10+gldwPthFyAuMRIK2bPg09FEx/ X-Received: by 10.182.74.226 with SMTP id x2mr591401obv.1.1386931662586; Fri, 13 Dec 2013 02:47:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.138 with SMTP id k10ls905541qek.13.gmail; Fri, 13 Dec 2013 02:47:42 -0800 (PST) X-Received: by 10.52.188.202 with SMTP id gc10mr171438vdc.84.1386931662450; Fri, 13 Dec 2013 02:47:42 -0800 (PST) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id sj10si587587vcb.90.2013.12.13.02.47.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 02:47:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id x8so1178468vbf.3 for ; Fri, 13 Dec 2013 02:47:42 -0800 (PST) X-Received: by 10.52.35.41 with SMTP id e9mr178132vdj.79.1386931662326; Fri, 13 Dec 2013 02:47:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp26928vcz; Fri, 13 Dec 2013 02:47:41 -0800 (PST) X-Received: by 10.180.187.229 with SMTP id fv5mr1946362wic.24.1386931661225; Fri, 13 Dec 2013 02:47:41 -0800 (PST) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by mx.google.com with ESMTPS id z20si809797wiu.36.2013.12.13.02.47.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 02:47:41 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.177 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.177; Received: by mail-we0-f177.google.com with SMTP id u56so1646393wes.8 for ; Fri, 13 Dec 2013 02:47:40 -0800 (PST) X-Received: by 10.180.211.212 with SMTP id ne20mr2255430wic.31.1386931660723; Fri, 13 Dec 2013 02:47:40 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id bc5sm4498454wib.4.2013.12.13.02.47.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 02:47:39 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, balbi@ti.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, Lee Jones Subject: [PATCH 1/1] usb: musb: ux500_dma: fix potential NULL dereference error Date: Fri, 13 Dec 2013 10:47:28 +0000 Message-Id: <1386931648-1540-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , static checker warning: "drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start() error: potential NULL dereference 'param_array'." Reported-by: Dan Carpenter Signed-off-by: Lee Jones --- drivers/usb/musb/ux500_dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c index 3700e97..9aad00f 100644 --- a/drivers/usb/musb/ux500_dma.c +++ b/drivers/usb/musb/ux500_dma.c @@ -336,7 +336,9 @@ static int ux500_dma_controller_start(struct ux500_dma_controller *controller) data ? data->dma_filter : NULL, - param_array[ch_num]); + param_array ? + param_array[ch_num] : + NULL); if (!ux500_channel->dma_chan) { ERR("Dma pipe allocation error dir=%d ch=%d\n",