Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp352202pxj; Thu, 13 May 2021 06:31:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZVgIxYa7ozm+wgij6X+ltv0/ySbl2BElVKoOCOQh+zi13xy//oKRrYxX2xCfRQHFvKzeV X-Received: by 2002:a05:6402:1d8e:: with SMTP id dk14mr45368191edb.385.1620912691299; Thu, 13 May 2021 06:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620912691; cv=none; d=google.com; s=arc-20160816; b=s3uc8R04yfpKKcgCZvzaM2uBiofe0/bgmcLxMGAdfOZgzuCZP8MJGMkfuKOz0iOzoR cDeVOi3d4WhMzluiZwH7KEoWVz72ekcYa45PnEUyJtcsHncaHYbhbBLMXzDg/vPPX+cj WTVpJNqa/UlcXsl9OAg5HJVOjbrv5JBjvRQh0L0C+C162eMb5fSs5VxVpRlztlBllR+3 IdhHpYs1jvU3+3TXgc81dLCXzKG8FknYaq6vF/LbQIx1zUWSXyFysIJyy34So7bN17Vb XA2mWu6QP7aZhxvcWN9NEuHBySl/YrEquqZW2+dLJZMfWvrQ8Xf6pWIsrLZBKU9R6+I9 SXnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=p5fBATYCllSM6F3/NMFgG+IQcmdGO9UEdSt5vczaSNs=; b=N2Tqi19MvBwr+GFt3AdeYPJqiVmdveWdUOjBEQ9fwwxz2Nxo0gmlvz/t2BDiGpGbUd cESqWI7SQ2FqEWqcNT7rQ+4a+UpgEgqFHMgqfUVRLocwlI5WWz232I7ruEtUUux7KBgV eerDcNS3oSVKDlJithoqzAfl1n14YR3M+oxWuZj3oyE5Wj2/wSpec08MrKdcmP+DnETe QlI8Bte/oZ+YlZuBQZrgmM8QjIObmQ97NpXk8lpfSHFwX4qYaJbTBIpm26Z8Hb8i1R1c grnXRYIvQe3q1QK9u+pnPCX5eaFzff99JVLTiph5zrYwUM2o5QNPkUnEucsGh/0ZUZq2 89tA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si3064000eju.670.2021.05.13.06.31.03; Thu, 13 May 2021 06:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233987AbhEMNaL (ORCPT + 99 others); Thu, 13 May 2021 09:30:11 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2587 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbhEMN3Q (ORCPT ); Thu, 13 May 2021 09:29:16 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Fgspq0J0RzsRJ0; 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:54 +0800 From: Qi Liu To: , , CC: , , , Subject: [PATCH 3/3] coresight: etm4x: core: Remove redundant check of attr Date: Thu, 13 May 2021 21:27:49 +0800 Message-ID: <1620912469-52222-4-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 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Junhao He "attr" is checked by perf framework, so remove the redundant check in etm4_parse_event_config(). Signed-off-by: Junhao He Signed-off-by: Qi Liu --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index db88199..da27cd4 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -568,11 +568,6 @@ static int etm4_parse_event_config(struct etmv4_drvdata *drvdata, struct etmv4_config *config = &drvdata->config; struct perf_event_attr *attr = &event->attr; - if (!attr) { - ret = -EINVAL; - goto out; - } - /* Clear configuration from previous run */ memset(config, 0, sizeof(struct etmv4_config)); -- 2.7.4