From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 615BCC43461 for ; Thu, 13 May 2021 13:31:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15F3761438 for ; Thu, 13 May 2021 13:31:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15F3761438 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hAx+Loaim7hyXKWtmd/xYa/Xi6Xh6UFaKaycqE5PmgA=; b=eVtO12NDiPrqytUAk88y94nM0 lZlb7jH8cosCLpV/JYN+aPqCBcLZ3HCaw+HkLZ7ux6O6XQOcdw3x5k8cSIya8Ay3gtIfADJl4cVT4 ekW6amnPIGxbi2rRzE/haO9844igQvJEpTVjeaBAYAax7vSgqf7LJq+6+2uJwobCBoXc2ZlhS4KZ5 T3+q6ZLK7f4XRDc/qsm0TshCbny47uXhyu2klHuK8GvfaRuWM84VR//jDaUUE2bRjDn//2zh59wA8 QGyM33O1BD7kOu1bfiotn0chHAB5jn0StXXAurMNei+fNWZpJOlb3d1Zn5NDgAcp8vz6nv1AN0IDK zQxd23o7g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhBO0-005bhC-Pl; Thu, 13 May 2021 13:28:20 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhBNy-005bgs-5u for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 13:28:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qSk8EdDb1kcRrXdlXtdeQ8jEmZ0tZKCez1hedruhaUg=; b=3RU7fTGpc1Z/IqhSGaaQ1xWxel 57OYZ/KL3Pi+3BzhF5LIv3bcp746z03fFDNDZLb9Gg0bLlQ6PSCqMb8S/e9u5pGa3lpLQZB0S+7gK ELUE9AcpQBI+UlCJTMtPnN6xmRycyAHi6+cr4CqVq78GljQTV3e9NBrUPB9vmaf6CDN8uj5xnzy9H Cd3EmBbrnUQJWQsHOLD4au0cEY5QWoMIvKLrA8kTvSuuafgNVLTCLe+WPeL7WVBaUmPEbIopiXDwx rstqFJJ0jfmvmShRwtas2xm0T9rFemUNxBcgpHxDnvp71zQRRJXRUqlL9Ho0ukVP3SE13sItthMts G6lZQ7gA==; Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhBNu-00BGzu-DH for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 13:28:16 +0000 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Fgspq0bGzzsRJ3; Thu, 13 May 2021 21:25:23 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 May 2021 21:27:53 +0800 From: Qi Liu To: , , CC: , , , Subject: [PATCH 1/3] coresight: core: Fix use of uninitialized pointer Date: Thu, 13 May 2021 21:27:47 +0800 Message-ID: <1620912469-52222-2-git-send-email-liuqi115@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620912469-52222-1-git-send-email-liuqi115@huawei.com> References: <1620912469-52222-1-git-send-email-liuqi115@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_062814_630293_8F775B78 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Junhao He Currently the pointer "sink" might be checked before initialized. Fix this by initializing this pointer. Signed-off-by: Junhao He Signed-off-by: Qi Liu --- drivers/hwtracing/coresight/coresight-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 6c68d34..4ddf3d2 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -608,7 +608,7 @@ static struct coresight_device * coresight_find_enabled_sink(struct coresight_device *csdev) { int i; - struct coresight_device *sink; + struct coresight_device *sink = NULL; if ((csdev->type == CORESIGHT_DEV_TYPE_SINK || csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) && -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel