Message ID | CWLP123MB54732B78DDB3CC67F2544A7AC51B2@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM |
---|---|
State | New |
Headers | show
Received: from GBR01-CWX-obe.outbound.protection.outlook.com (mail-cwxgbr01olkn2023.outbound.protection.outlook.com [40.92.112.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3B3C1DDC0F; Fri, 17 Jan 2025 23:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.112.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737157241; cv=fail; b=r43AhhurPkiG8+1WT+gXhDi0GAy/84OL1JQT4vAzsVy8ssVTNerBRq2BF/c24HcJEXiFdpd0j4ALnaJYFASuBh/8eCMdyjx3aOOOg9nWB5vJ33E0c1NI2xtPvLFGfyFq4I9CnlydUKByKa6b208o6XmszK/+Ah2VQxxD8oTLC7o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737157241; c=relaxed/simple; bh=WiG2bX6V1A0y46pxpoCSREfSI8ZkVt1LrWNMcECe918=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=G/WyVC5oFWq16ttEleDw2yM/ajFLivTfxmpcdJqYoXEVkSN6s2g7MjRhsesJBnteN1XvejnI/7pc4YJjVwIfZ7ZmksAW5NyYXbJ9+6Jf8G/t6LGqC+aDQUHUJabo7nt7fozNpKDVjJrxZsfZenMxd+92bgiqKi0GZWLvJ10V13k= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=HJyf2aKA; arc=fail smtp.client-ip=40.92.112.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="HJyf2aKA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VIWBLo6dOop/ojLahJuCsCbvteSyR+xohrglGZ7ZEpal+0GXza7DANoZ5PtQ2wu475bl0RUOuSObeW72JNoWOd8is9vOsa6k+98Yr+kC4s757bCXDhDaWtmRFgkOVmk0iYEfqhsk+VaLnX0i1RYIiO5gv9vdSO7WeB4v0PUmU1t1vkxsLjUqfsdTIANHfEVHX5PKSLxNBjJ1GbwhfZkg4cxqkJw5QDWCmpgm8glPgXQFAanoo8wg3awORy36xgPOGskO8sK05eMDAGzndIGHJQx1bzYF+et/Wrf2yGCKQDD/yePMfVPV+N2OnJev7PeOStrbOGCQFmBn0Y3qlHLK2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=0AzLQwmGaXuUyhKvYIvXIoJlxmpHxgvilNBqAEC+Ix8=; b=FxHeUk2HO7DzNMDa8z+rH9ikBppDnY3LWLJ80F9n/gXQ8WHyZGZUGIkk36l09nsudOGTy28vhuGA7p7IHE+O57Tqx1tQXaUwuRq8Ls0MzelZ3ezMm2pZw7p08MujJOJwcBaRmWIGkGTNpuuirXQuosiuvX+AZaWDNltLhxlOeBxqSU4IxpxpbM50ewJ09EXiH6dvmjpjU04hb5SGhTjAhBVGPVbfsodfzgDY1zcC+ZD/+vRbBbpR+Hc/qczKMVc0RpTuPx8Kocmdu+Ar5hKOpadWzS6m6o4qmNDlNdvVQV+l72wshyoaU9I0/0wwqSiRZX9Nbsh3MM08elnSEkm91A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0AzLQwmGaXuUyhKvYIvXIoJlxmpHxgvilNBqAEC+Ix8=; b=HJyf2aKAQpA/tK+Kv6jM4KBmADdB3MuX839BR2RKjCtRCKh7JMRQdIm+NFW/WqDA3OK23feVlODB5FVkA8oFUuV2xHvvPgvC6JYW0c4VMwhuDi00b67XT0xBOIn59L/SF+0uf5dBwDtAaSAEIHNctfGIOF3l+jX28TQeLeYkVpbztjFVcG2/9qGMcSYbTsH43RDBBgXidloecF1oOqlpF0O87tUbaJnc+fwoI1fFwA+nJg8HIs05Vy+6/E27Byp3TBlErYFkv6r09uwFmC8nT0ct4RB53SACVdnWMEdU/hDMDSWbjLP4eibE3IMPV6Wxyr7gV5XXiKIoTC+aL94/Bw== Received: from CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:160::13) by CWXP123MB4166.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:b4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.17; Fri, 17 Jan 2025 23:40:36 +0000 Received: from CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM ([fe80::c0fe:9ff5:51fd:3fdb]) by CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM ([fe80::c0fe:9ff5:51fd:3fdb%6]) with mapi id 15.20.8356.014; Fri, 17 Jan 2025 23:40:36 +0000 From: Manuel Fombuena <fombuena@outlook.com> To: pavel@ucw.cz, lee@kernel.org, corbet@lwn.net, linux-leds@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] leds: leds-st1202: initialize hardware before DT node child operations Date: Fri, 17 Jan 2025 23:40:28 +0000 Message-ID: <CWLP123MB54732B78DDB3CC67F2544A7AC51B2@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250117234034.670794-1-fombuena@outlook.com> References: <20250117234034.670794-1-fombuena@outlook.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CWLP123CA0273.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:1d5::20) To CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:160::13) X-Microsoft-Original-Message-ID: <20250117234034.670794-3-fombuena@outlook.com> Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: <linux-leds.vger.kernel.org> List-Subscribe: <mailto:linux-leds+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-leds+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CWLP123MB5473:EE_|CWXP123MB4166:EE_ X-MS-Office365-Filtering-Correlation-Id: bb0da065-8a19-48aa-9756-08dd3750575b X-Microsoft-Antispam: BCL:0;ARA:14566002|8060799006|15080799006|5072599009|461199028|7092599003|19110799003|440099028|3412199025|41001999003; X-Microsoft-Antispam-Message-Info: rxFKtT9T6rqjXSgjFdRCgN58ns+H4yI8moh+1jQ1nYHinyeMkgngY6HDDEP/wVwprTzv4HA8HcsTkAZ0/lG3HK1pdSWrMDyPLUNuyayQWS3wJINAhJ46JQ4eMRvJ/Vdcyq9r1hOJ7ciw6Kt+kKY21KdnIUh1MsTLv0002ZaGGy97EENMAjQyS/cThPqimpF81M8RR6kfK8sia7fEqVRovX7TPl0OI+lQniB+kFWHFbc9eGnJHxLNWbI6ktDAb1KOUIsaVY4DsJxcwftpU8lLnVwLl3fVmXmhlTHnic3QUcgshv0xakJokIosPWtTNFES6WfTixtchm27a0PQylynK5KoJKjSQ5kE/JU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Org: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb0da065-8a19-48aa-9756-08dd3750575b X-MS-Exchange-CrossTenant-AuthSource: CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2025 23:40:36.3039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWXP123MB4166 |
Series |
[1/5] leds: leds-st1202: fix NULL pointer access on race condition
|
expand
|
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c index e894b3f9a0f4..927874f20839 100644 --- a/drivers/leds/leds-st1202.c +++ b/drivers/leds/leds-st1202.c @@ -348,11 +348,11 @@ static int st1202_probe(struct i2c_client *client) devm_mutex_init(&client->dev, &chip->lock); chip->client = client; - ret = st1202_dt_init(chip); + ret = st1202_setup(chip); if (ret < 0) return ret; - ret = st1202_setup(chip); + ret = st1202_dt_init(chip); if (ret < 0) return ret;
Arguably, there are more chances of errors occurring during the initialization of the hardware, so this should complete successfully before the DT node childreen are initialized. Signed-off-by: Manuel Fombuena <fombuena@outlook.com> --- drivers/leds/leds-st1202.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)