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=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 47CB7C47096 for ; Thu, 3 Jun 2021 05:49:35 +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 104A7613EE for ; Thu, 3 Jun 2021 05:49:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 104A7613EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9LnL62J1zHNmjojuRRDvSJDeOCZ1Kf4/Zo86HUmZi2I=; b=aHAVJiRyPb6A6u O6NA98ko7Yi2ihTZ/O7MUOLwMxIRfF8lLRW4oIaPpDa3h6ss4JHm+/CmVT8haS/X6/Bo/Ru1NtqbB 2vJCZF273co8qiWuMCSKAszW03HaJbctC6vcLYJrrYQWntxgLaVRolMrhE+2eg8AQdcBs8ahuwCTA k+KbFlVk82j4VnnTxw4ogimFbAXwuXr/kRYE87zz3KW/BfBu+pdB0vS0Hckvz7/kwNTJcoWF+yBHT 1g+XIRWp4QNgpcDmYc1sZPZX5eutMCZi6ELBGohNQjhYHeqVJwuvNhhjNyqToAI7yiaZTGeCzio0P EIJzT2el4UTpB0e2WQNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1logEY-007ELW-Kd; Thu, 03 Jun 2021 05:49:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1logEU-007EL0-VZ for linux-phy@lists.infradead.org; Thu, 03 Jun 2021 05:49:32 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id BCB1361369; Thu, 3 Jun 2021 05:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622699370; bh=CA5CSdjZBRa4Qv1WOjAo6swDQqJBKNZLwtBz5M0dgFs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tt7d1qGGJogMUnc/5PfH4Lrt+r0I2N8YrFtIP/37cijqWfVxeh3K32vDsqH8Mn4wQ pD/INgfKqg+ZTG2Ni2R/tVmpZlthg8DcwhVE13EIV3N1VPARHtL0wv6iK7OUxqkypI bJ+jD+amRs02mV0hbx/C+rY2C6Pf8/fGvzNayI1LNMuEx0Tf8z6VBy2yMB/ptHl4Gv iJGeE4eSOm6rPvjR8Y2BmbBXI8CdKJxWvVjhJbVV8UD4MC1r3uu/o+WzzFqTy09erg F5EFh465+dmYqMF0Vg+189tlDr3OjLuBQ7Z6pbNvch/Sx/B9pHPn+DoVJ2XU0p3ucY uajZ/AQu4VDTA== Date: Thu, 3 Jun 2021 11:19:27 +0530 From: Vinod Koul To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, steen.hegelund@microchip.com Subject: Re: [PATCH -next] phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() Message-ID: References: <20210603051014.2674744-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210603051014.2674744-1-yangyingliang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_224931_049804_03315988 X-CRM114-Status: UNSURE ( 4.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On 03-06-21, 13:10, Yang Yingliang wrote: > It will cause null-ptr-deref if platform_get_resource() returns NULL, > we need check the return value. Applied, thanks -- ~Vinod -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy