Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp846288ybi; Fri, 12 Jul 2019 05:37:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfSyKvy6Z+CoQz3JiMR0aOk89SJfdSa7W4FebYuqgfNFLrJ+/C54hJS2CgzLjwrF75Gs1H X-Received: by 2002:a17:902:724:: with SMTP id 33mr11008660pli.49.1562935040831; Fri, 12 Jul 2019 05:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935040; cv=none; d=google.com; s=arc-20160816; b=p01BTEc0JdUHqCsDyEaC2FsYaTenipyY8p9cqBDHLmrykNDbOGxY3wO6vNDDMVVp3s K6sufCJ2Fo6pUd0/uHC3IyclENOXRjrBEbWZHciMBf5EW3Y0js9aywAL6C3kvybYLTWH AEkBYsyvm/07crsnerwymGf7FUF8Oz7D5XpyNpqqJ9Y/neOysc1Dd4d+JKVNUH/7tmyC U1nHu0e/1o6fJyk8UGxa+fb4N7EaIPEfJsOH9GsJQt4HKl/8+4AtBpdTLGbWmRubYUdo lVaKq8q1GXLWOy+rHF+DXizRUvZ9A8/l63UzVSCp+PpXe9/gy95r7jIsIajDhRmHovQu iI4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jP10PjfWfx6UMvwHZP3qkoFfL8sK+XOZ7ZPP0aAKtLg=; b=ZUYVAj1Gq8P4B9MCTzSAi0sjPq2g++/jBjjcZBLiaMOajfStSvmUn1TrASD4DQkbxs anA+br/L16WIBG7trFA9N0u5o9eWLJkc3o4M4hmAWCaxwN4+QZKTEOniSOkUjUlHV135 Wp7hhMPJ5RQjTZRvn7vDOX+GNZhCMK0wb7CAhoAUzWzs9EAb8+OUPKse39kpZVkmUUV/ A8Gb2qmjq/3KQtTqgIzLWrIKgIQPJCi4BFvQqUl1uLIUOTDfa+u8/46Og9WqosS9WCfQ tds02XEh5Bf+ENwiYkQKNdfLBi97CI363ml+v78Ivv0EHk8GqVWTr5ta5TYWKcWp34gs vA7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="2JkX3/k4"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m127si8302342pgm.100.2019.07.12.05.37.05; Fri, 12 Jul 2019 05:37:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="2JkX3/k4"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727627AbfGLMer (ORCPT + 99 others); Fri, 12 Jul 2019 08:34:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:54784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729776AbfGLMen (ORCPT ); Fri, 12 Jul 2019 08:34:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F2EAA20645; Fri, 12 Jul 2019 12:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934882; bh=QRsSF+WCZ0+JMAzHJH/vuxQnavogD9WLbjsinyx27Ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2JkX3/k44K3G+L6RLPO3oxjmKeY6GvRuhCy061ATi5XXImPZSL08huRt4AGt4JPFb Jagh427nZadsJR/lLpDluJ/KA+hFQWsM+4RFHjvPpsl76aGPk9xeEIkNEwdALtqIwT WdPMOxFNFeLsAS5we6Pcu8ezMlLjhWit+jl9jInc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Mathieu Poirier Subject: [PATCH 5.2 45/61] coresight: Potential uninitialized variable in probe() Date: Fri, 12 Jul 2019 14:19:58 +0200 Message-Id: <20190712121623.044961135@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121620.632595223@linuxfoundation.org> References: <20190712121620.632595223@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 0530ef6b41e80c5cc979e0e50682302161edb6b7 upstream. 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 Cc: stable Link: https://lore.kernel.org/r/20190620221237.3536-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -241,6 +241,7 @@ static int funnel_probe(struct device *d } pm_runtime_put(dev); + ret = 0; out_disable_clk: if (ret && !IS_ERR_OR_NULL(drvdata->atclk))