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=-16.9 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 333C7C2B9F4 for ; Mon, 14 Jun 2021 18:03:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EC2CF611BE for ; Mon, 14 Jun 2021 18:03:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC2CF611BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=bombadil.20210309; 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=dQSrA8VmyNDO0uv+iBpUPfuASzPTmAKYHAbEBitpipM=; b=R4gDzIvu0D1myi lMRSie0hzJ6mmtM6zu+vEDP8pZgwrihlSW4Ov4jJtXkHa8N3qj9rFXQrWpXSX+1ujL0FHTgRbk0bx qASBxwvjTkTJJXN7WMZlkkomypuiiiuWbrf+nJGm6KZxB17MwleZeiGCeFChEJb5dyaaq1te0t8Rn CVmybOScnVuc+Zi0DpKQACBTTtusI44zgPpqA7E8aFIA+WtuOWywBgA1wGEdo3mzzkZ+X2oibgU4q 5ic50jg5uprtwlqK8FWyCGPxNx9F8B0O9JUMt+5Wddlg7eTKKY/PrhmIkIUS0e3k1K/lqsCfwVhKR QjMxv+K8OkpR3MIiOTxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsqtk-00FZrN-CI; Mon, 14 Jun 2021 18:01:20 +0000 Received: from mail-pg1-f180.google.com ([209.85.215.180]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsqsa-00FZSB-SO for linux-arm-kernel@lists.infradead.org; Mon, 14 Jun 2021 18:00:10 +0000 Received: by mail-pg1-f180.google.com with SMTP id t9so9267876pgn.4 for ; Mon, 14 Jun 2021 11:00:07 -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 :mime-version:content-transfer-encoding; bh=J+erjNqDrPoL2uchSu9MBs+KDJ5et74963hksVtnp4U=; b=ktjbhTt3lFNJ6ACFxiZ5oXAKXa263kBrdQ7nUNo6fUizS688kNIztupsr8eMphLCNR 98dtW+RZDmdypbhhDT1XEN/3IxDoL09OHy/uTSEp1as92NkfkFvG3TSvqbn0rW4RMU5C 73zPD+M8oQjXyWaFk9K5vI2qO6VTnQibRWE7y+zNkBbwPoIWBRH+Fty9FJTLljJzZslc mijpsxYKBc/p87fe6eZb4Qxx45GiAIc4bet9+3h/nx8udX95OxHnEflfczUBbYExP2EO GGZFnw8Y2JgPw/2xKayNzhlPhNTLcjmm8UuZXGsmEHWP8ytaFh7SwQtH9UqaKgvwoG8g VxdA== 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:mime-version:content-transfer-encoding; bh=J+erjNqDrPoL2uchSu9MBs+KDJ5et74963hksVtnp4U=; b=qzJFCs4SJYOE6shASylHs6V88taK+5J00FVW98w84dsaKvPVJ/KLPHB0LnCsxMW3ce mJjrxwX2Mz/DcCUl6GxA3C5IYdjnxAKQW3VP5DxI/0GJJFf5oDVZrD6LEir+iDi8iGxg PaZpG098kwV3vFNnM/jfHapS69uNqZPpzkrA9K8RFmdDgHU71AKeWoffK6FvJgV/8mfg QcX6x05y48MIY/hCW5trJd2Fu+mB+28akdFZ9BH1q2Yac3MKO6wUkWQccx07qM29Eabi 4z9l1v6GBbOqCBowSBsTtSwphkkNxGmBmo3PyUHXlpg4YbOa/pJnir8x/PSJoORSnoZH 56TQ== X-Gm-Message-State: AOAM530ENd1CNtynnpcxlCVP2AMcOv4Udybjy6k3fku2q/U0qZfwIplm PyZxxpXjqijopltl4FaDiuDn/g== X-Google-Smtp-Source: ABdhPJwf6/qYjkPrsRLZtvnEVqB2JCec4VNquyuN+tC3lcaPzyQhoNr9AZXeHvgHdSMAFv9ib5LAuA== X-Received: by 2002:aa7:9ab3:0:b029:2f7:e053:f727 with SMTP id x19-20020aa79ab30000b02902f7e053f727mr118091pfi.74.1623693546772; Mon, 14 Jun 2021 10:59:06 -0700 (PDT) Received: from p14s.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id z17sm13553246pfq.218.2021.06.14.10.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 10:59:06 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] coresight: core: Fix use of uninitialized pointer Date: Mon, 14 Jun 2021 11:58:57 -0600 Message-Id: <20210614175901.532683-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614175901.532683-1-mathieu.poirier@linaro.org> References: <20210614175901.532683-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210614_110008_983294_D8A74961 X-CRM114-Status: GOOD ( 12.93 ) 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. Link: https://lore.kernel.org/r/1620912469-52222-2-git-send-email-liuqi115@huawei.com Signed-off-by: Junhao He Signed-off-by: Qi Liu Signed-off-by: Suzuki K Poulose Fixes: 6d578258b955 ("coresight: Make sysfs functional on topologies with per core sink") Signed-off-by: Mathieu Poirier --- 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 a7971c68b0be..20ea4aa619f0 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.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel