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 BAB8BC433EF for ; Mon, 20 Dec 2021 16:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239580AbhLTQsK (ORCPT ); Mon, 20 Dec 2021 11:48:10 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:35648 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237112AbhLTQsJ (ORCPT ); Mon, 20 Dec 2021 11:48:09 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 8BD0920E8DFE Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH v3] USB: host: Check for null res pointer To: Jiasheng Jiang , , CC: , References: <20211220134244.930727-1-jiasheng@iscas.ac.cn> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <2f38e1cc-b245-9bd7-f3d6-2fafc470c215@omp.ru> Date: Mon, 20 Dec 2021 19:48:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20211220134244.930727-1-jiasheng@iscas.ac.cn> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/21 4:42 PM, Jiasheng Jiang wrote: > The return value of platform_get_resource() needs to be checked. > To avoid use of error pointer in case that there is no suitable resource. s/error/NULL/ -- platform_get_resource() doesn't return error pointers... > Fixes: 4808a1c02611 ("[PATCH] USB: Add isp116x-hcd USB host controller driver") > Signed-off-by: Jiasheng Jiang [...] MBR, Sergey