Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2698353pxb; Sun, 31 Oct 2021 23:11:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr0f4NRwoAJL3w21X7dXsjqrSouHv8MPAI67nksa768IWGKFhrm0xS2KGitlZFjolIrkHb X-Received: by 2002:a92:ca47:: with SMTP id q7mr18394659ilo.81.1635747097490; Sun, 31 Oct 2021 23:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635747097; cv=none; d=google.com; s=arc-20160816; b=lhK+tUPfxPd1TvpA4ZXcBRfuPfy8kys3A8jW3dW+u4huEvf7e4Djn49GOB6rjKCloO V9xlHcKekAUtz68ME1H26Ky+HVEpZCAPUec4+MjWWai5Gy226oClrPUpwZyhDE0a+qmu QSfDXuVhrkhPV+M6PJbK5poJoIBw3/ZsqkqVjco2f2ddDuG3QPBWkByETsXGDLNK0Fee V8wwhKQutZhDBoBeI11gZAlEYXqvQ0H0Bn2GYYbg/sBS6E+6V0/8bhQLxIUqx2rFkvE4 x0HMeGgrwOoQebscS+xtbFHTH0HrxMp/u3jzURQv4JIoaMG65zs0mdXzmdvSRhhobbPa zvRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=xVKTQc7OPGqCgUqaW4iGQjm4T5FKiIv77uCXhzrHMa4=; b=QJg7lXD297ObZhcWt+I78LUy/t91/gvly8AA+8w316NRtwdzm/h9CpsfAuBP8BMQZo KhquELM7kTDeLH/MCApH2PUzv4qP88nF1h/1RrcEoqshWBNtMEJs+9AlvzH4A2kZJeII V/hJNgOsZ+bcojeeirby89K/zl1x0hJBely+JNHkgqXz3HAzgapEWpRilrQsX5gsVgxC bNTesWKbydCb6Aqv6r0XnYk34f8acUgh+DZ4OE0xulyvAgsZd03spztpjmIrGg2i9CAq bwbMzutxb9WoFIgrxUm1/RgGhiPjJwf6eEhVFbnShRY0djavQFJN7H+CMiMtUl0JPVxX 9wSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=CRD3SrYz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si25148626ioo.113.2021.10.31.23.11.25; Sun, 31 Oct 2021 23:11:37 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=CRD3SrYz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhKAGLx (ORCPT + 99 others); Mon, 1 Nov 2021 02:11:53 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:35312 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229827AbhKAGLw (ORCPT ); Mon, 1 Nov 2021 02:11:52 -0400 X-UUID: 42d66bd2313546df99e5b8fda1e34e51-20211101 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=xVKTQc7OPGqCgUqaW4iGQjm4T5FKiIv77uCXhzrHMa4=; b=CRD3SrYzD9KnCvotD60fVLwRPs3gABLwpazhe5BwqAmJyFapMvlYpLvVOGELXnh6zrk+lwEdVzAjoyzad/Lh9QX5ulwJQj9r82SYlNWBeTTS1GfRXcodE2LuyXlqO/NI7Rexm1xpFprvhmMzohJuaFaDLDI1/SBfYa/zfPHdaJw=; X-UUID: 42d66bd2313546df99e5b8fda1e34e51-20211101 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 902528883; Mon, 01 Nov 2021 14:09:16 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Mon, 1 Nov 2021 14:09:15 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 1 Nov 2021 14:09:14 +0800 Message-ID: <9e4f327511fd85ba8613ec27644fbc29bc4ddb6b.camel@mediatek.com> Subject: Re: [PATCH] memory: mtk-smi: Fix a null dereference for the ostd From: Yong Wu To: Krzysztof Kozlowski CC: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , "Tomasz Figa" , , , , , , , , , , Ikjoon Jang , "Matthias Brugger" Date: Mon, 1 Nov 2021 14:09:14 +0800 In-Reply-To: <23b036d1-bdc4-da55-a800-03fc3dabd48e@canonical.com> References: <20211028055056.26378-1-yong.wu@mediatek.com> <23b036d1-bdc4-da55-a800-03fc3dabd48e@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIxLTEwLTI5IGF0IDE5OjM1ICswMjAwLCBLcnp5c3p0b2YgS296bG93c2tpIHd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