Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1779564lqg; Mon, 4 Mar 2024 03:43:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVf61t+Ft1dYEesnMAn4Bh2GSK11tfPQ8X6CnfSy/Q6o/u1S/4Ue7Z0v6UMdHx2LsucL9FGBV0jTRcPnqFQFtxspj9x50i7+e311dldHA== X-Google-Smtp-Source: AGHT+IGwXrmsYyUFH5VkwVlCeeZWecFGQwHgWbE8v0Y7gb8Mf7ICDXp6LKT3iq1siXQ0S+glSw2J X-Received: by 2002:a17:906:c49:b0:a44:1e32:a503 with SMTP id t9-20020a1709060c4900b00a441e32a503mr5956993ejf.22.1709552635212; Mon, 04 Mar 2024 03:43:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709552635; cv=pass; d=google.com; s=arc-20160816; b=ZsnsSrgvyXi+UYietA7CvTyeJpZ6bGdqs3L1HFO7kDAR2N9x/CpXYAJJoX0PzI7R2R MGTLRIuLXd6IxAitP3x2x48xEkJ7l+QxHIxBHH8cjbrLdPWKOtuNTI3QCOeX0TmEkFuO fYQ8HR1RSS8jYVKbCn9Sxlfig0CIT0MhOuKQC06cK8zRWK5LEFxjY+UJu1eeIfux6m+6 wnKgUb5OMFFb6GfgAAZHOayWHFP3YF9DJZO4x2178Sjjb27TPlzjLS6afzd4fygNQobz Cklq4iMMj9iaZ2SVg4TnyTBsGG8bUWkhl7lJcVRovssyFM/n3rRqegKxytWyxaPDOGtu hbQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=h/N89wHsupO3eOr5saosVZAEbXKftzVyWze4j0uXvhg=; fh=LYFwHGH1TT84CrWz5brRN0xs2bEqssm3Qb7sINjSdUY=; b=UVgAc8xK33q9U2FjVlfzzoVxl7GCcgxq8iU2D5JlI29750IjGFZmBd/ypepgbjI8bX Vlqgqko0+bCrp/zs1/28J00DBZvTUOLunoV4wxWEXID9lGNvBtWVDQYM7d/vWGC02kt0 bnQCzZoAaB9Rd1o0tz4ogRdZlsIBRHMBV53MOm8CIMH33v4MVEBb2GNmslLugs5HBTM9 zlXGCRfHt5ckiTWlDTd+uaOTGJsO4tVgApwQR8V6rPixLUiRggTPdOv2vDx8ySxvAVkC +5FHyPmTTWIWisYVC2MNKUkBvmBN8fWTDYtuJ7KrYGYzwNVLrftTauVcm0mK9nXrzniE aZtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-90523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e25-20020a1709062c1900b00a4452b31420si3563788ejh.246.2024.03.04.03.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 03:43:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-90523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D5F351F26F38 for ; Mon, 4 Mar 2024 11:43:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 123203A8D8; Mon, 4 Mar 2024 11:43:47 +0000 (UTC) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40ADA3838B; Mon, 4 Mar 2024 11:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709552626; cv=none; b=jofjJcASFD5wkvkD5dFVTa1k634WAb5X5iHQ5IlTSsj4WWofVJ9CsGZHgw+kMLzCmaa3YDCJGHBf1DKrhKLdiexyx5egjWIb7lzoiipPKu48OZ5fp1jhpT7JbACJmIOTAo57ufow8esJmvif2jBzLZA86aInssgc3/onsV0ZbPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709552626; c=relaxed/simple; bh=h/N89wHsupO3eOr5saosVZAEbXKftzVyWze4j0uXvhg=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=eUzkq1zpO6u5ivbLg6cLjxBjU7rPIo9x62bYXReDBCigaFZyYeQZR3cuJ4nudHhdgTzOvGkdJRkunR2o84SLfl4qBbNHYA4USD9mZ74jSFNQ3i2UjcOFr3JYsgKZ988eji9F7uxvEuUTmyC2UJZz4CCmOzgPWutq1DOw9JBsfvY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru From: Daniil Dulov To: Vadim Pasternak , Hans de Goede CC: Mark Gross , Andy Shevchenko , Darren Hart , "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lvc-project@linuxtesting.org" Subject: RE: [PATCH] platform/mellanox: mlxreg-hotplug: Check pointer for NULL before dereferencing it Thread-Topic: [PATCH] platform/mellanox: mlxreg-hotplug: Check pointer for NULL before dereferencing it Thread-Index: AQHaaMPFv4wPmJNqB0Oh/Aq5IIhcv7EciV8AgAS1laA= Date: Mon, 4 Mar 2024 11:43:38 +0000 Message-ID: References: <20240226145442.3468-1-d.dulov@aladdin.ru> In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 SGVsbG8hDQoNCkkgc3VwcG9zZSB0aGVyZSBpcyBubyBzZW5zZSB0byBwcm9kdWNlIGRldl9lcnIo KSBpbnNpZGUNCm1seHJlZ19ob3RwbHVnX3dvcmtfaGVscGVyKCkgc2luY2UgaXRlbSBpcyBkZXJl ZmVyZW5jZWQgdHdpY2UNCmJlZm9yZSB3ZSBjYWxsIHRoaXMgZnVuY3Rpb24uIFNob3VsZCB3ZSBw cm9kdWNlIGRldl9lcnIoKQ0KaW5zaWRlIHRoZSBsb29wIGluIG1seHJlZ19ob3RwbHVnX3dvcmtf aGFuZGxlcigpIGluc3RlYWQ/DQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBW YWRpbS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