From patchwork Wed Jun 19 19:53:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 11005161 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 263B914B6 for ; Wed, 19 Jun 2019 20:01:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1449C286A1 for ; Wed, 19 Jun 2019 20:01:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0741B286BF; Wed, 19 Jun 2019 20:01:22 +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 B10AF286A1 for ; Wed, 19 Jun 2019 20:01:21 +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=AF2rde6Soo3Dp9Y936Shh+Z79tXGwMf5PNBTwWvruag=; b=mKusdol5F1aHCU6WtB1p3/xUWx s3oDFOwlsvy7QkyVAduJf06VfFuDrMkqY14vB87igiX+ArpgcwssK1Wlv9pf+fpXxzONV5j5/n2Gn 0kNZ8mAF0Rax52q91ifcs6C7c8MEJ+Zaarc1WircLX5N24W2wbd6eyfvxYtq21FpxFyc3YOIJiCwJ KceSdoi8ftydpr3t2egQHyn1tbM5f9GDRyPPa8vtfh1mi/tdeVMbKbf+vNFE9uzzrNHh7a4SJcODs cmEEX+fXubQ4kMwU0Q7MiWPn7l/fsAkc5ygTuLvVLMF4bNFjTG7pO7KQtaeUD03iayJIW3Jw4Mi0x ARDy/15g==; 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 1hdglf-0006oj-2O; Wed, 19 Jun 2019 20:01:15 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdgeO-0006gg-RY for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2019 19:53:48 +0000 Received: by mail-pg1-x542.google.com with SMTP id 196so237563pgc.6 for ; Wed, 19 Jun 2019 12:53:44 -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=gXxfLSHgLZGmqkWHxSJZdsVy2kycSL/GwJEpQt6NxwI=; b=BE6q+zq7W9YCQV4bIxZaZC4SIPCeFlkmSHKrRLQFQivCglkMTdRMJO47pPhJfc1MRp To1hwcc+BLeb0E+jHlCN/yxESj55qtjK+bbYF5r33QwTQYoFVPhfj11a3lYwKKejNI6e 9yWwZU7Q8tTC2PWgBGQCckpIB5a2VyeEDTGVuwAUJH1enI9INaifZ5O8IAtb0xAsXfwj u9HkA3dh6HvACsQHRgn7dJGuCaqMi7594jB1LdJMdP3tzcAh7rTeg1lDYVvW3CwCHNBF I6AoBGIZc308w91RMEq9EfkqOMzWZJL2KbELfJE97Tj4q15yg28KZxakmv5s44grEqnf NX2g== 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=gXxfLSHgLZGmqkWHxSJZdsVy2kycSL/GwJEpQt6NxwI=; b=L6q+tfHtNGjjSIqMFIVL9ou+1MJLu16SVyyOw0KSdLwH8a5mnjbJzpUdTctZXZLIXc 6F7HYtfclyswAqf8TWuQQdPitP8stK3APMbaDMFvs+ryFggPdBvwEAtK5ltmUpfzaKjf jUlGke9jZt6RMctTzLMfuIncL07+5cM2p1QVXryADcWMwFNTU88TVeYLWHFvD1s0SifK BZmAU1U/1vNjUPCC3HM06MDSkzJPyOkj8CsTyAPDhpvhiLDjSUwinNojNOlizD4oLtGC UkDhAetsOotn6IzP1DhsDnu14rWTjKCgU0AGVx3jhB6daJuL8bGpNvtXtwiG46jqa0fI 14YA== X-Gm-Message-State: APjAAAXTImmz81LAi+/pFus4Oqd3dbQUHwlRsCJ4qQbQyGrEj12XH/CL shGjvKwYN2ypYpy/EbIO3CDBlA== X-Google-Smtp-Source: APXvYqxHNKZt8vSfKkKHc2OAKvHAxBAwi+1M7WWaszz8fYVUv4fOX81jC+lL/Pz1O0Uo473IunsQIA== X-Received: by 2002:a17:90a:bb8b:: with SMTP id v11mr12744868pjr.64.1560974023707; Wed, 19 Jun 2019 12:53:43 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id j14sm21615993pfn.120.2019.06.19.12.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jun 2019 12:53:43 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 24/28] coresight: Potential uninitialized variable in probe() Date: Wed, 19 Jun 2019 13:53:14 -0600 Message-Id: <20190619195318.19254-25-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190619195318.19254-1-mathieu.poirier@linaro.org> References: <20190619195318.19254-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190619_125345_026120_0C24DA80 X-CRM114-Status: GOOD ( 12.08 ) 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 5867fcb4503b..fa97cb9ab4f9 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -244,6 +244,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))