Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1917223pxb; Sat, 23 Apr 2022 22:30:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCKc6KeEZDC7jtiiQytJHcBv7zER5MMH29D2jZ7pMlMTcrXvbDttOuizOZ0Kvp4hddITVZ X-Received: by 2002:a05:6402:5113:b0:423:f5c2:cffb with SMTP id m19-20020a056402511300b00423f5c2cffbmr12725941edd.174.1650778225176; Sat, 23 Apr 2022 22:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650778225; cv=none; d=google.com; s=arc-20160816; b=xUD+UW1gQWajXmhfoxeYqdcogGJ9uFU+xs2ihMJz+qei9u50IcsVKfpRK6DQwDpydR vKvNvLv4E5eV0tjPqB6czMaHzO/h+Ghbqv2JHTwipF/2YZ1zHPxYsU9StDoZjM6vrYvf mizziuEcSE6hkQ1DuFksTPUgaYJsdXRRiLOMwz3GeH4SKYGrmgS7dkUfHMynnjHkaPUA qx9l/OPABlh8m3FKN0vgeeaawKiodqsG4nIb4Dm3rnEVwqzU4fJ+sZ4AS7aPKzM0raKa gKguzKTjVALi8kWDV3rGOxKcz5rBWE0y4Yi9w5+NPxVkNz7yKT+Jc5wtuG/6vm1GBnVx TDyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=+AdIUbyhQ1FM8Qr4z3F7SIMPUNfixc7ZjG21UJyByHU=; b=YQX9/k6d0N8uw4eUJV0BZZkGPfZC6GQkDKX4y/K4KaJCaPw+ECEnJJkG5pfNQMxEP3 ff2ZSmoJpEiwHIWcWS64/PIjA9iibw+shv10T52+LsI4t69fSVa5cd0zLqMVi1NpkD1i PAaBUkT/8fM4c9+iTIV6Hvc5zol4mpaV5NwxrSTyI53QsYwBSANOiygZpjPTBbqGvecM QsHbrxLqWRmAcJjGKkWSPt8HB8XHjzzZFN1I+T0WYG3MFjmNFo397OPqJnHzj73JM2pq ksAyL7/EtlYRkAgyBr4LAJ9pIj4x3pUPSIt8TQHM0EFAogTNvrxtUmNmU9zg+I2VzkAd CYqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a170906300900b006e82db9fd02si9611887ejz.991.2022.04.23.22.30.00; Sat, 23 Apr 2022 22:30:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237581AbiDXCIs (ORCPT + 99 others); Sat, 23 Apr 2022 22:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237572AbiDXCIr (ORCPT ); Sat, 23 Apr 2022 22:08:47 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC93F6469 for ; Sat, 23 Apr 2022 19:05:47 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Sun, 24 Apr 2022 10:05:47 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Sun, 24 Apr 2022 10:05:45 +0800 From: Haowen Bai To: Nishanth Menon , Santosh Shilimkar CC: Haowen Bai , , Subject: [PATCH] soc: ti: use IS_ERR insead of IS_ERR_OR_NULL when checking knav_queue_open() result Date: Sun, 24 Apr 2022 10:05:43 +0800 Message-ID: <1650765944-20170-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the usage of knav_queue_open(): * Returns a handle to the open hardware queue if successful. Use IS_ERR() * to check the returned value for error codes. It will only return error codes, not null. Signed-off-by: Haowen Bai --- drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 4dbaa8c3636c..24334ebb7cd7 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -789,7 +789,7 @@ void *knav_pool_create(const char *name, } pool->queue = knav_queue_open(name, KNAV_QUEUE_GP, 0); - if (IS_ERR_OR_NULL(pool->queue)) { + if (IS_ERR(pool->queue)) { dev_err(kdev->dev, "failed to open queue for pool(%s), error %ld\n", name, PTR_ERR(pool->queue)); -- 2.7.4