From patchwork Thu Jun 20 22:12:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 11008309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B44C276 for ; Thu, 20 Jun 2019 22:14:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A45A2288FA for ; Thu, 20 Jun 2019 22:14:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98D1228900; Thu, 20 Jun 2019 22:14:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E607288FA for ; Thu, 20 Jun 2019 22:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fmG1+7DlPifeCB6dY+OcT42IV0YdYeTiR2lVCr03k1A=; b=ePynD2P3tQZ++UN+eq/VT2Tbp/ zWbcCmOaVmbfZ3hwIfAsxW2ibK4Y6bZcoiN7LkstPznhOTd4ZNsW93jvbd8b9U4kMBXBoC79y0Bkk wWqXQfLfkBnhY/nGh4Mf3ATZM3Y7KvyFZTrn3sGDHO21Im5OY3XaMBwUq0jhPfK5fXSKHX7OObOWx 422O11UJOReh1GdQFr2gQvRo+hSnGSs5vtolRdgLXy7hUrx/hfFsoUrQpMCZHWKGFUWApDLXvjIn0 B/GB0XJafrIOqKKyeuBl+1JnxeKLlNgMJhaAI8iihQ693ujbWsu1aWqGGEoPOahaoaFGEtyzSY7zU BkIhY5cQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1he5Jn-0002gs-Pi; Thu, 20 Jun 2019 22:14:07 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1he5IY-0001PA-BV for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2019 22:12:51 +0000 Received: by mail-pg1-x541.google.com with SMTP id m4so1693301pgk.0 for ; Thu, 20 Jun 2019 15:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8MyASeb2pq1GJMfZxC7yx2+Bj3AJzIxnxH61a4huhDc=; b=XrN3HU9izdd2Sp+S3438jh8C2VSDKv7g0b3Mqmwoir/dPFn7Miu1I0sUirGMWc5eMm dxhV3RJtWXAOrBiw/+ggiqgb0yx25zlSfSIiVUpC/PydlbuX8Q/QTSVO87qTGUBOttxk Gm9vcsZT5umuozCGcGuj0422PivlfEEbuY354gRosgVBQWqH+X3NjCKCb1WmGgNrBB0J WXrA3W8ann+Jq1QuZImPORxWUKD4tncngVYQKQ0bdgLKZ+FVnNddlQID++yF1VFvvF0h J+H1vcOcCO6uNr6qEl8PDzWqxbzMJs3FVOvf7UiKGte5ztcQyaHDBYOA1yE4iEOET7O3 17nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8MyASeb2pq1GJMfZxC7yx2+Bj3AJzIxnxH61a4huhDc=; b=uZqd3P6TknUJR8Wxrfw+5gXpm70nip5nN+35uTvKh4K6nAXLx7EuL5AOEt5/zEGu2Z z28+rJsJ2U2JpjH9pFbn5GqMhCb5U53eyslgL1oAUEI0FKOzDDoe+fcg/IG/oN6y44Ty bI3WBx6l2L1laH1jCZE123jl1a6EZ+yT1LlySEXEUR+z6jY7FRxbEwCl7OcoI9eWyR+n hC7ebqC1kQdNp//KDCBcU0icue9oEpI+RMaUEU4/5XZkcPcxX6GWO9rAlh2pfs4kEUBu vk6700CaiHkHaQsdlF2wnjRdhaMpGJEZWhQwMsUntjzVj6ISzUme9XtF2fjxokvoqBDz rcPg== X-Gm-Message-State: APjAAAXMALcwUt+qcjEN/CPXmCcP5Qno2Ui4DvQyqGzeNP3pYrhW/FsO 7EI0PuAdt7tr/JktPWJ5dzQ0PA== X-Google-Smtp-Source: APXvYqxxSDzac9zXrBTJvjPo1TwxzRO4032QR4BB6l/8YhaZ65OcHnnp+rf15FhLYkj3elOV3/55HA== X-Received: by 2002:aa7:8106:: with SMTP id b6mr60711746pfi.5.1561068764781; Thu, 20 Jun 2019 15:12:44 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id x25sm450636pfm.48.2019.06.20.15.12.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 15:12:42 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 5/5] coresight: Potential uninitialized variable in probe() Date: Thu, 20 Jun 2019 16:12:37 -0600 Message-Id: <20190620221237.3536-6-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190620221237.3536-1-mathieu.poirier@linaro.org> References: <20190620221237.3536-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190620_151250_436522_53156DA5 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Carpenter The "drvdata->atclk" clock is optional, but if it gets set to an error pointer then we're accidentally return an uninitialized variable instead of success. Fixes: 78e6427b4e7b ("coresight: funnel: Support static funnel") Signed-off-by: Dan Carpenter Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 16b0c0e1e43a..ad6e16c96263 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -241,6 +241,7 @@ static int funnel_probe(struct device *dev, struct resource *res) } pm_runtime_put(dev); + ret = 0; out_disable_clk: if (ret && !IS_ERR_OR_NULL(drvdata->atclk))