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 E4815C61DA4 for ; Thu, 9 Mar 2023 08:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbjCII1B (ORCPT ); Thu, 9 Mar 2023 03:27:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbjCII0c (ORCPT ); Thu, 9 Mar 2023 03:26:32 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F04126E95; Thu, 9 Mar 2023 00:24:30 -0800 (PST) X-UUID: cc8a0aa2be5311eda06fc9ecc4dadd91-20230309 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=MIME-Version:Content-Transfer-Encoding:Content-ID:Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From; bh=Is2VqhbOsS3IuWI76iSIP1Noak8iMHaPakEyzPgYdVU=; b=l0TBv2VZhCpKM95h/KvVrPPoApVkWZRoZk0VmC9zuigsqOeTQRX9cpD5DSGibYEuSNZZT5EAy9/hav38XTvUBaEAz+dv+zawlPApz3qJ3v6dM6dCAoNBZ18it4f0uYvQ9EqpqmrFKdZHJZuUV+V5hihDNPHHBQXv2cWST9r9qBk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.20,REQID:ce9ad68e-2953-4b12-b955-e8fbd725ed07,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:25b5999,CLOUDID:4331b6b2-beed-4dfc-bd9c-e1b22fa6ccc4,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-UUID: cc8a0aa2be5311eda06fc9ecc4dadd91-20230309 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2046927754; Thu, 09 Mar 2023 16:24:24 +0800 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Thu, 9 Mar 2023 16:24:22 +0800 Received: from APC01-PSA-obe.outbound.protection.outlook.com (172.21.101.239) by mtkmbs10n1.mediatek.com (172.21.101.34) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Thu, 9 Mar 2023 16:24:22 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GUeJA/3c2+rclh0opDWxnLrP0xTOyCarSdTsWzymfog/hAiAAAftCb7yY9TmzOrk5H3B7EvGipgQYA1SU7tu+GpRr/bEdYa77LrAJ/KQSsk7O549WQmTdlKjoCJabpdR+zPIZ/THCJ+Elnlxzq6y7R6+vt4lz1ZBpCLC5cy53P57nnSUt6jXWGW1yDNfwlbq0APoPUAv4yC6H2izUiwzn7o43iG6pTYUJ1OOx9uRL4fInm/qzxoonVW+5XaMgXcPAsNgkkpyZ+e5YZ9/Wp5uVqzcnLLj/C/d95i/yW1Ov0zP2odMVZaDqvM0Zvrj6EZHWrh4jmtN+ppJRStof+1ijg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Is2VqhbOsS3IuWI76iSIP1Noak8iMHaPakEyzPgYdVU=; b=mpnZBWasj6Blw18UgFwEVctGuhtwe23pM2WoGJamAiNs1JB8zoP6vDOuNFZl1OLgxeGdGLPUS8g+6m6RsJ+nNdk7y9h5t6CPM2TZcbsT5P1z1VluTRXevCc1TAdYCOUOVPOOCY3+XvLnxVZndKD9Q1lmgoNcJ5TOTqWPU0gghhuV23xAgljYQg8Fv5oHfBqvBO7GpN1P2+VSC7LbfFZgCAW+fE0V6aUZiBrVxWzK8C51LzD3hAXztfxjtWkyUHeqTsCQq2VkPmHha1loPu5rRnMApIjwypMgYKNYyuRKIOuAxppiKrXWHlPHXtOotH+t/Cz5GvRuBmAKeu3WZb3dvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mediatek.com; dmarc=pass action=none header.from=mediatek.com; dkim=pass header.d=mediatek.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mediateko365.onmicrosoft.com; s=selector2-mediateko365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Is2VqhbOsS3IuWI76iSIP1Noak8iMHaPakEyzPgYdVU=; b=URkWxoVaJrs4psGeiSBlblC7+nABFqOJoQBKK9h6aH5wNtMnujSD+3MBf+GsdlWtBq8BmUTA0jWIfXXCihBMUWO/Znc6Mb/OFhylmW+NNqFq4p11hGOHcjz2GPK4ilh/DApq29h9j2NsChV98WBShMtPYK7A0InYRXHlVcqb/nM= Received: from KL1PR03MB5650.apcprd03.prod.outlook.com (2603:1096:820:73::5) by TY0PR03MB6821.apcprd03.prod.outlook.com (2603:1096:400:216::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.25; Thu, 9 Mar 2023 08:24:20 +0000 Received: from KL1PR03MB5650.apcprd03.prod.outlook.com ([fe80::40f8:8248:54d5:a6ca]) by KL1PR03MB5650.apcprd03.prod.outlook.com ([fe80::40f8:8248:54d5:a6ca%9]) with mapi id 15.20.6178.018; Thu, 9 Mar 2023 08:24:19 +0000 From: =?utf-8?B?SmFzb24tY2ggQ2hlbiAo6Zmz5bu66LGqKQ==?= To: "mathieu.poirier@linaro.org" CC: "linux-arm-kernel@lists.infradead.org" , "matthias.bgg@gmail.com" , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "bjorn.andersson@linaro.org" , Project_Global_Chrome_Upstream_Group , "linux-remoteproc@vger.kernel.org" Subject: Re: [PATCH] remoteproc: mediatek: Dereferencing a pointer that might be NULL Thread-Topic: [PATCH] remoteproc: mediatek: Dereferencing a pointer that might be NULL Thread-Index: AQHZTbrUIf19zHSerkC4hHxClViIAK7pXiSAgAjHeoA= Date: Thu, 9 Mar 2023 08:24:19 +0000 Message-ID: <29643c069485b2c7e49fd9e40c26b60f86a63a86.camel@mediatek.com> References: <20230303102751.9374-1-jason-ch.chen@mediatek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mediatek.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: KL1PR03MB5650:EE_|TY0PR03MB6821:EE_ x-ms-office365-filtering-correlation-id: abc0a79b-2207-49cd-76ff-08db2077adbd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Vtg3zPehkL+ehKcs/4yNeRbwsr2VSQCiNeQgbds6vSHFXScz9v5o0Hm10Kw7FeJa7sdu93/Sf6FO2NQj6EeOiJBdamd95Ue3DQvLbX2mNZitGmMu/K5zJixsT2XW6ncc/tAW5592fWTMDP7tme888qsKGji6zNuAYOa1zxLuxDhQGi95EQOPCpqrvuSNLzlxISrGX6Hzlro4IMm16sGbQW52BUhDMEmzMSeam99sbJrkWYR7ZgZ1cJmTpF5vqUue0ExKDhwSBZ2gJVhwUUBIx6O1D9KEZ3C3wJi76uetOoyPN2qr6XocbYIIZJw4xx/rTUTEA7ylWoGUVvfP/LKLDXU1MRDsGM+Bw/Iw5Xre0ra0fVnlGSkddR5QXTzibJwg5cm72RQDmcZSs9xcbO66Po3w7K5I5eS9SqDNJThRKPrLpofQDZaAn+1Wn2LNKwPlYQiUvRKLLC/5uBBm2N1wxXOBhewPvXGyPfpIghKUkhvIT4Ov/D9E75x/g88vaHPSlPSv1uSH+cQiJh/n8CF1QEHtMbdMutratphFPR1kdodo6ELEnIo0caeaUfwFgRVyX76ROZNui1BNnGH/dxbJiQouSC0mRe7/MbOHRjeopdLmilHdY4KzQdv4SacUvxPivjmD4ryhtrcyMnTzYPt4t03o1upUJs6fXCtNz4p6C2p52a1U0OwiNFS3HbYisWqLBZ50HyOT8ezLJQ2QclJl5A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:KL1PR03MB5650.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(366004)(346002)(136003)(396003)(376002)(451199018)(5660300002)(186003)(66476007)(36756003)(85182001)(26005)(478600001)(41300700001)(71200400001)(6486002)(6512007)(2616005)(6506007)(38070700005)(66946007)(8676002)(66556008)(4326008)(6916009)(76116006)(66446008)(8936002)(86362001)(54906003)(64756008)(91956017)(38100700002)(122000001)(2906002)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?ZjM4TEhocUxCOGlFQ2d0VTFmMDBiVnhaREdhQ2hTRjRwbFh6dm1rK3dSUWVa?= =?utf-8?B?SVVXZ2hDbVRDbUQrSmJTd2tCR2ZqN2VhRXZDaUVR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?B?S0tIOEQyYkpIdEM2R3loV1MwWFFGNDJ4dDhHUzh0dFVPNjdmSEVzVGdiMFYx?= =?utf-8?B?OStmRHVFazlzUjBYK2JQR0VyeDBYLzNLVXJUd3pZQlFqbmNDelFOMEZ6OTJU?= =?utf-8?B?ZjRvK2R5eEdUZW9rN2tRRDNpLzFwWkJnMEprUGhRMythbXBoaktlM3NPUTk0?= =?utf-8?B?RzdBS2J5ZDlVTHJLRmpnZlhxODNMdDkzMWNGUlpkL1hhZGVlaUhVUGFSZDR1?= =?utf-8?B?ZHc4dFlIeWZlV0VtUFdlNTJsUEVvTmhnSWlEL1grcFZFdUhnTmczejQyMWo1?= =?utf-8?Q?Udfo+FLFg78cHb2yfe29vcQ=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <40A6DA48390042468B84766C0C09F685@apcprd03.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: KL1PR03MB5650.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: abc0a79b-2207-49cd-76ff-08db2077adbd X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2023 08:24:19.0660 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a7687ede-7a6b-4ef6-bace-642f677fbe31 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YEbsKhbuktrfCE63mcb+t508VSYhV3Sp+bEJttoiYXKGmtiY6UAl6u7aOSyWBH0FuwA9tN6lrZxlrahcBODX+xskkYbeNKLESARLuL/swow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB6821 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgTWF0aGlldSwNCg0KT24gRnJpLCAyMDIzLTAzLTAzIGF0IDExOjIwIC0wNzAwLCBNYXRoaWV1 IFBvaXJp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