From patchwork Tue Jul 11 12:45:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118534 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp485654vqm; Tue, 11 Jul 2023 06:38:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFllkCmF1C12C9P+MZpPaufkzQk+a2mUd8aV8/8vFJINuSllE5XbkIgvPsgZNxYh31/Oz6F X-Received: by 2002:a17:902:b689:b0:1b1:7362:9a18 with SMTP id c9-20020a170902b68900b001b173629a18mr11646832pls.27.1689082720999; Tue, 11 Jul 2023 06:38:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689082720; cv=pass; d=google.com; s=arc-20160816; b=SnLIbQHjZDtGuj+RajRg1FZQGxWf6H4WC+fXbCP372K8giouR5Je3j1A/YkjHTXJ3w h1lwj7zrd57IT7t55K7rwm+FEz71M1D93wZhqyJEQaFy5/XmGIHUca75vL3A2QDtu/5z cDP8L1rvgWrkeRZs3DvmpbdAHdfxMgT+p+B+J2PYO0LIZlvMBQx/ZTg8aZ3HXnd09SNX Vaf04R46Dtb45P8Gcom24Osc3CCeaCik9rDJJ0Mb3xno1wL1MWldm/Ir95ecsIEFzP/w JeE/bfaVdd6FH44adK0HtBJybZ6cZ8qb0qIIBAO29IwF3NReGv9vQA+haxeE5PVGnfBf gpJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=y0ktC7CJms/ki+GW2IJDpPkDeZE+eLUm5r3WNDEIkTA=; fh=CdrYng8vV7cAvLz62iQ12mCjZGk5JsC4NYobCvaUY5c=; b=sI3UvW3cMC5j3rJQToNAN5RMQaSPpJ4YFuKMYswW/kJTdJeO0RQZ2LamEkXNFxKBuA C1aTUxVUydw35nEMh6r9Dtsh+Psmvf5HY9YUXza5KbeKmsT37IHzMNqq19La5NQebTPU 1C7TM169Lhy+3umv/SJqpL4EmOku0Ly32cSk90oj5VETUT9me+xjsdJRWdi3/F5sTAt5 b3o5bp9JzlBLFuRKFpi7AS5NeycrXvnwDj73EQB61Nj8Ch9rjTt8wn6oD1sYjLBbSP9r cDEXhNPhcolKj8r5ezu8rHCVDDzGsxHTzo5tpqMKOOz8D0N5SubJvfB85b1wezjN8fwK rNXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RE+tm9f5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky16-20020a170902f99000b001b25ade9ea3si1582056plb.337.2023.07.11.06.38.26; Tue, 11 Jul 2023 06:38:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RE+tm9f5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231488AbjGKMpf (ORCPT + 99 others); Tue, 11 Jul 2023 08:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjGKMpd (ORCPT ); Tue, 11 Jul 2023 08:45:33 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2112.outbound.protection.outlook.com [40.107.117.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A1FC9E; Tue, 11 Jul 2023 05:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7ebJlQtMP+J4Fnq2A3F2kT4ON9iZW+f+VAHxqI+DVx2NTDFPIAfDUuRA/fdYvnhgwqnnkytSqX7JJ/LKDnloRPcaSyULDzwAnJjbJzAmEhv8BrQy771gL4XmeVRpkY859G/YqkA/QMmIculioJlFtms1TJh+FG6oBw9bDKQacl/7PFhOssMPNpKQtmcB0mKkS4gbyKdHvmsF9QNa1Hjdjs32c7UBB4tShzxpxyrw3c1pDqN+gN7UGX7ImTp7Hdt4gKU+WfSwkPPXIQBDk2COwVrRW0mDwNYgC3r9y5u2MwQI4A8FJ87dlPhOv5AQxgtvRXlGHVFa7EzWzY3hqzh3g== 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=y0ktC7CJms/ki+GW2IJDpPkDeZE+eLUm5r3WNDEIkTA=; b=Hc2H63PFSoP6Yuh8Y7Dcwu9HkJULsEvXDb7V/11A/0ECVMtwBkuVYd/lseQGPdcWwotruBLZMiaV6s8PlxCM5o5vu4yHvb9nIbMz0gR+L5PCFCu08xpeOcdEC8WmTCqoqd8P5btMW5kulf/YP0e2X6QC7FkAbjui/RaIX65nZxSDL3kzeGv8gxn4hfiB1jnFWerYo5Mou/zA37j0yqgnqyBsg/n9UrrhtRK8Kw6nZQO2OpqHlJf0MgBq3pO7uOLlPBsv4uEgeaisx2joJCVnnpV0/rRK0RBHQF9XTXFTVMCn1DlNFAplwydiXuT+Yr42Z3clqfbHQJ8YAPMqU9amwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y0ktC7CJms/ki+GW2IJDpPkDeZE+eLUm5r3WNDEIkTA=; b=RE+tm9f5FmWSP5fZvNDSAx7gYVll4A/lXZZEtcQEYsCzw9T22RiC6l4bmsxGqxp0Lpe8XirSq628JzHsvotT7RGqLfiJxBqDpmw2RM+JSZae97fcaEkZC7G2NRAA1PKue5OdW36QxDZK9XT9Hdyt65NUJxM6rUCNSMp6F0WubzWeGjMzAE04yTR4EXc2MNYtb+/nyPh1jw2AhMZAu4fdUE6f9io1bCV0sGbu4+bc3bA4rlNpjWo7o8T/DZn5r1OHzQRaLrC0dCpXSMM9f6QqndZnNNHRfkee2BzU8Nt+mFabsJMDFUAi48+usSt2og1bsoZ4wpw4ab3sMjwoEPhisg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB4314.apcprd06.prod.outlook.com (2603:1096:4:158::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Tue, 11 Jul 2023 12:45:26 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 12:45:25 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] thermal/of: Add error information printing for devm_thermal_of_zone_register() Date: Tue, 11 Jul 2023 20:45:11 +0800 Message-Id: <20230711124513.47771-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR01CA0042.apcprd01.prod.exchangelabs.com (2603:1096:4:193::23) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4314:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a04bd2a-2574-42ac-204b-08db820cb28b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5YUACi7+L7k4uAXGWOAliQvffjP4wf9gmWeO9+cSeHEee/rl3ehFtJLKO1qJGC3+lkRm64vMi/qd6D/pdqU++6eu1rBjEJHfFCxyPIIQqbhfcV3eYq4UpU5CQBG0Yvr658z4uMu4ItAt8549EGQaJm9JfDb7QX5Q6KAZd3S5eLaG+S0XT4kUdxqNBiksb93Rwmks9lbQssAuyTKtQYgzDprA3UH+VzCRYoLYQh/2QoKwhzD+4zyQUiH13L5n+DQgh+MLlBpEhD2Nfvp+7jNv52t6qCKkOoq059qzNfgVJi/h6KNT23zCmhHVR35rApazj0XT7Ldlfwnvu6Isv4xL+M9rHpOMoZP1YYCcAqw9ePrv4fHzX6+9HwF4X3nJ1e6BJqrXQjMj5mdW/elsg0ISTc3Dx1jcVbspl3Qly9YQHR6DKEZLr1zqcM4u0onJbpV7FsC0wuBFK3wXZ9n8jLBK4vybH2bqfCCuf0oU5ZTLH0UXjistRVBGxuRpm8drIkGmFdd8Ca76zan1lbcIQM8nV890VFjNcwlPukb0zdalX1/oxAgrKhsM4LTQpzXCYvzXYwkZpwW0PE5RNAUSqaTRmZVFZiwIjKMv8QiRl0PqD8WbXCe6NVip61eXYeBnMG/e X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(396003)(39860400002)(376002)(136003)(451199021)(38350700002)(86362001)(38100700002)(36756003)(6666004)(6486002)(52116002)(110136005)(6506007)(26005)(186003)(6512007)(1076003)(2616005)(5660300002)(66556008)(2906002)(316002)(66946007)(8936002)(66476007)(8676002)(83380400001)(4326008)(478600001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rwHr7IxZU2gxHQzT4ZUiwADPL07F+YayrZgzukislY4NGY2LR8RLMs1H7TQlKTX3ZhTtwV2WzCsee8v6Weolwobm4r8KLJ166+s+19e/CxT+XIDKd4rBYD5NvzEnHXHEy1v6LZbWYMbWLfbm+090A9PEUDKpTLEvaNskOgzkZ9fhXS0XPs8EbhpVJaGwuQ6zRDW96zVZ/bceB0PjrvZWs4zkr2MxcJXV9jPEvWhT2v70870rzn+MzHdP9zXbY4bVSwGaSuvxaV4Iz12pPUACSJ5IZY+Z8MlvmyRTjN2xeM47BITDaaOCw9/lvPnn1VAa3kFmgQsjTOx1A8ZV+52jz1tmxhnyj8upFDXZvPmpKWx5UHQs6e1m6i3saE1mT9c3uHb3nXEhEt3FX/XDM3RZprS6SmnqkW4IoD2FD8AbfErO39t5wHCuA26947XdnV6rpxTnvNK5CNLl2q/vyxTcmlMD7dIySAnLZ65FdOC41zx+8eVkCFnDnXhpCK474vBRzwmdAXcU1e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VXzo9fMSfIkmTnofZD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a04bd2a-2574-42ac-204b-08db820cb28b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 12:45:25.3180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZWzMayWfSDQLpSzdMZdwXOUkClWfC6U7bDy/ntV3c2xUmioPFe2XwFPn9/EaywtWMF5KpJxIHHfBkugCjW0o4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4314 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771131603309134053 X-GMAIL-MSGID: 1771131603309134053 Ensure that all error handling branches print error information. In this way, when this function fails, the upper-layer functions can directly return an error code without missing debugging information. Otherwise, the error message will be printed redundantly or missing. Signed-off-by: Yangtao Li --- drivers/thermal/thermal_of.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 6fb14e521197..8ce231f7639a 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -583,11 +583,14 @@ struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, in ptr = devres_alloc(devm_thermal_of_zone_release, sizeof(*ptr), GFP_KERNEL); - if (!ptr) + if (!ptr) { + dev_err(dev, "Failed to allocate device resource data\n"); return ERR_PTR(-ENOMEM); + } tzd = thermal_of_zone_register(dev->of_node, sensor_id, data, ops); if (IS_ERR(tzd)) { + dev_err(dev, "Failed to register thermal zone: %d\n", PTR_ERR(tzd)); devres_free(ptr); return tzd; } From patchwork Tue Jul 11 12:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp468673vqm; Tue, 11 Jul 2023 06:13:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlENf0pjEpduAzuorLvIegJTyteeJC/aYbb+LijkNXBMFqTddMYSx7BeHvB6iFBEz8Fnd2ou X-Received: by 2002:a17:906:190:b0:993:f276:9696 with SMTP id 16-20020a170906019000b00993f2769696mr12699896ejb.35.1689081221667; Tue, 11 Jul 2023 06:13:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689081221; cv=pass; d=google.com; s=arc-20160816; b=KN+5rFe+1wYo4/R2AlKHGncGqe5kfeUqhH9zJeHskjZzTaji34EqdBO3jkmf6htvwO HUQaD3nH99x5SfvbRzRWmyouTZewsx8dqSBXH5ovS1hBxMiN7xCtpAKMJUUTL6NAKGtS a6e9JsASqJmQGo/JpT3yqVwsf5t1zWLwZ8MUKM96WnFxNLv3YTDdQG7UIZRgg5qDvlyq rHE3jSYgL1yZS5x3rOtwPavAUAA7tviVG73ry3HF9w4n3DkJVWPg2HBDZtDkyKEo++H5 3Km3AAB0O6llv8l6dVPTnJgpobdMYYd98t7cB/ZwT7X1D+1Z3jbmNXv03vyr32uDIy+K bY4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rG+zOn3YiN4uVlCNl8VaAKlaD/ghnlwmfM+LLbXpkzc=; fh=iwgb/ms117a6yp6zHyAdjll6ia31IpYReZeGL/DYVT0=; b=VC3+Ks9apeYsB8oSKzyRQVVlGBdw4a7ZXjhr25utaV8tk0IgAc19qBrCDCszjSyuFq UeEwobLzzeevhAmFPfik5R9WoeOBTzMmIldNDoeLNQC8/GbpllRkTl9/UP+4WEz2dIdN JQYLB1zwc850gKlUGCBQMe/TOC7irHIkiz6mTDECRF8ZzEZ7uY7yDQjX8NrM/33C+CF1 AEYLxwyFZYpsFbJYZ1tH233M0AjvezQ9+OVnbwBhYWzjW2BYvCyZnDEz3HoknkryCAPR oHjvejHexlhYiAQf1KfzAICJppx06d+1SADey/Fp6OQE9iF0EfTjL3FW6l/ToTXXaVAw TEqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WJBdUqvJ; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi26-20020a170906da1a00b0098653c15e94si2671979ejb.117.2023.07.11.06.13.16; Tue, 11 Jul 2023 06:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WJBdUqvJ; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231986AbjGKMph (ORCPT + 99 others); Tue, 11 Jul 2023 08:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbjGKMpe (ORCPT ); Tue, 11 Jul 2023 08:45:34 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2112.outbound.protection.outlook.com [40.107.117.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B156310A; Tue, 11 Jul 2023 05:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WR7yal/H/tyik2c7L1SlB7SPFPUw1AeZNO5NR9OoUnuRj5cArK9TozQ8OzfUV/sryeaWmhbcdLlsklh562a2ycw4mfPfy2JPJ4JydEepNrXryHNOi6C4wSkjCMrBLkT9vYKVac7dmKiBlaEXplC9SQdCupyxOwYjn8NR/HRy4hAa7kediygb4nqWgxNLhrCEB4Xi/zCn/HkQweBRk/c0wr8JS1pVblCSUHXGGm77i7OQm5tbvDKZumg0Cy/FAtrxDG9PtEFYJAgVTR57XyEguyTuWi+B4A377a7JwUByiJyyTj4zMGl0pu+BCADtOUGMMcaLTZxyRsv+1ym4diTmZA== 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=rG+zOn3YiN4uVlCNl8VaAKlaD/ghnlwmfM+LLbXpkzc=; b=EP7Osvv7hBr6Wsd5ubB+Le+nPa1BUBbP7XRT1OsLRnfimqApsAp9/f5EDnYpAMtZPLDb5VJCxSQwrhEi2ACZz7Gh2IHUwMq93TZAF7lrj4oNjhPyZ8hkKVzE0uLePwf9d/yYSbZyqZZfTjoBJKsb5W8zZtlvvT2I0O2d+0NByOssyQSdO+uANqGMTKX4q03QQEO4alq5fPzGuIbEDkzVvcOclH4X0hDWRhBSmZy+/cclkJbTboEvlwiWR9RWkDYQciarb3WbkIa3XI9uGdKifETncWH3dnW8kBHQGSRNy5EqDv899RQu5DVN10r1byAXUInQV89xFWoSz/jWnYEARQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rG+zOn3YiN4uVlCNl8VaAKlaD/ghnlwmfM+LLbXpkzc=; b=WJBdUqvJe4/WiTeGZ28iI+++sQy+WqWOmpmATyToKyLUFVkYR0hRM0EkKSwi/s0kCbYOZasKJaNFZjYr4WTX0Y+23VAtKXERf6NN6m5+KmCkCKv8FIADo42B3GVuTE6H4liEItCFhEuf+lUJ3hgd6/TTrOESzdihkmnyOoY83D8hJZlUiE+SPYrjcvClnPtS5Bg3McnQ1/BySg1zNXJpnuihXqP56mTGO/s9jNDrVPFgc72GPysWjkbaTcGsN21SxFsykYdHL4RNObvDYb7OwYECuC0NcxYQN2+hZ6suCSy/u75Q119CdqU+APyKZQEwmyBi+PTmjC0QEMXfAeM5Xg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB4314.apcprd06.prod.outlook.com (2603:1096:4:158::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Tue, 11 Jul 2023 12:45:27 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Tue, 11 Jul 2023 12:45:27 +0000 From: Yangtao Li To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] thermal/drivers/amlogic: Remove redundant msg in amlogic_thermal_probe() Date: Tue, 11 Jul 2023 20:45:12 +0800 Message-Id: <20230711124513.47771-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230711124513.47771-1-frank.li@vivo.com> References: <20230711124513.47771-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0042.apcprd01.prod.exchangelabs.com (2603:1096:4:193::23) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4314:EE_ X-MS-Office365-Filtering-Correlation-Id: faa72e04-c658-43c7-23d8-08db820cb406 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vzZqJ31kacHZad/t7ssrc6ooeIWHJ2LZ7Vl/y064VwDLJ50Xb0vKtxUkAZBaGsfJZFyI9oYo0ZuHX0Tp8al2MVCOKzqUoWKYdQEkKPE2QkCs2IdTd1Zjjpd6q8GdtkHUpbEqQLHemgfkbSrfBnmS738xwKOzmlRXT96/7A+FWm/9PjknXQP56tQCAMkhrIEzWKoXDtQdmmum56GoCI+7dc5J3RAtG521ohAEY53QCw3ddiS0vXcFaHCun38JwYmyCa7Ng9liL1pogDCZxAybQKD5kXV55wzC+YvcDWWz3TGbcjWcLT3P8h3oi2IZff8weTVvFrui5XuzFttxQJUPgqVqearlwsQmEqck2/a95qL0wI/adTCrtXqhDvo/Ns3ctAKZXIvwRCUoBwPKh6sNcQIkPRZdL6i2yEQlQm3HTrtRKTe+wKNqPH2GKy+CO+fyUe0uE0izyze6mZXCnInxK0st9c6cvbUaOi/Mz7ku1pWaH6Kr5DPPG4glKQu7r6fmuhYbVqVh31H7E0WNyULLFLzyjbtTOytzVP+2l1/y2eAHwdOX9oobgkjI40P/gTfar/Ge0PdBnlEzsVN4F9mkBL7k1kNMG7Mio3i/ITraz19g2f4S4CCgM29xSEK2WqmP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(396003)(39860400002)(376002)(136003)(451199021)(38350700002)(86362001)(38100700002)(36756003)(6666004)(6486002)(52116002)(110136005)(6506007)(26005)(186003)(6512007)(1076003)(2616005)(5660300002)(66556008)(2906002)(316002)(66946007)(8936002)(66476007)(8676002)(83380400001)(4326008)(478600001)(4744005)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vCZtVDOIwMivv9ZzJ5N8EsE8gWmBvLrps8yimg96MJqeVr1yTQwME/4/pw1rUhysqtp3ddCCCyIrprzSG7DpO8pySlcpvpLIOci2UICP8c5N8gv3TvJeiNa4/C4Ur2fjmxT9nuAKmuj5WRJWIfEjTWnUPvCTnu+tw1gg3UeB85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pchXzPCdxdwH+y2cq7r66XmMTEn3lFG39+5ZSSQ0hbzC4q1zS/JVZE2syloP1f52ivQOmp5ZAbAaptRdT++TrymGIOKVjlTJTv2/ugTB97kXJGauDMLGHDkUZa3kb169Sk7I2j/m2kvD74C7gMjTNPF5Fr2VdcZgyZGwwx3VlRGMKm1b0JBZGH07jC30VeytCYhBWOh/sm2/PHeX1N0iaSD2xZaHHSuneeXVZ+w0kcbupTZbWjRxCWaO6vjIWXERrb8ftIC0BxMTq7CAoOaICPzaMYgXzQcgdrfWW8y2DZKNkc78yarZsZNIWy29SzpSflKef6tCiqKVf02qVEl4QOlx7ntER4UZ5rFuZ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: faa72e04-c658-43c7-23d8-08db820cb406 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2023 12:45:27.6736 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zCU2jiP4SYWdQWEiPDjXwBWVMQWIGGC4jYIyMvLxqbhjE/2+GLM67MeSRKZC2P1zMtPMvbHxZ4NNbGqNApaRvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4314 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771130031462823049 X-GMAIL-MSGID: 1771130031462823049 The upper-layer devm_thermal_of_zone_register() function can directly print error information. Signed-off-by: Yangtao Li --- drivers/thermal/amlogic_thermal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c index 756b218880a7..134f5a8d1019 100644 --- a/drivers/thermal/amlogic_thermal.c +++ b/drivers/thermal/amlogic_thermal.c @@ -276,11 +276,8 @@ static int amlogic_thermal_probe(struct platform_device *pdev) 0, pdata, &amlogic_thermal_ops); - if (IS_ERR(pdata->tzd)) { - ret = PTR_ERR(pdata->tzd); - dev_err(dev, "Failed to register tsensor: %d\n", ret); - return ret; - } + if (IS_ERR(pdata->tzd)) + return PTR_ERR(pdata->tzd); devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd);