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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87A9CC433FE for ; Mon, 14 Nov 2022 11:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236326AbiKNLP7 (ORCPT ); Mon, 14 Nov 2022 06:15:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236651AbiKNLPG (ORCPT ); Mon, 14 Nov 2022 06:15:06 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0101C29E for ; Mon, 14 Nov 2022 03:11:18 -0800 (PST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N9mnt1cJ3z15MZK; Mon, 14 Nov 2022 19:10:58 +0800 (CST) Received: from [10.67.110.176] (10.67.110.176) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 14 Nov 2022 19:11:16 +0800 Subject: Re: [PATCH] firmware: stratix10-svc: Fix IS_ERR() vs NULL check in stratix10_svc_drv_probe() To: Greg KH CC: , , , References: <20221114025921.1194834-1-cuigaosheng1@huawei.com> From: cuigaosheng Message-ID: <4cb8207d-e2c1-b459-e456-d8998f8180c8@huawei.com> Date: Mon, 14 Nov 2022 19:11:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.176] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > How was this found and tested? Thanks for taking time to review this patch. I found this through the cocci script, I made the patch based on the code logic, but I have not tested it due to the lack of hardware devices. On 2022/11/14 15:24, Greg KH wrote: > On Mon, Nov 14, 2022 at 10:59:21AM +0800, Gaosheng Cui wrote: >> The svc_create_memory_pool() returns an ERR_PTR() on failure, we should use >> IS_ERR() to check the return value, and return it on failure. > How was this found and tested? > > thanks, > > greg k-h > .