Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp462638imi; Fri, 22 Jul 2022 02:57:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sLt6q4tlUZPTAk5Xwez2lRxv4A6GtaaX+DBC4Whma3QoJSSL4gVsmprJV67ao7ve77tjKU X-Received: by 2002:a17:907:1dc4:b0:72b:4d85:c7c4 with SMTP id og4-20020a1709071dc400b0072b4d85c7c4mr2463241ejc.258.1658483833843; Fri, 22 Jul 2022 02:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658483833; cv=none; d=google.com; s=arc-20160816; b=BRnmcwA2n3+zJLs+u3NJRoujA/C9PHOCtHDYlj1DMlBEmkWSua1fQ1paQK2xiXNbJM klzy7Q8rDg7WaH1/C6eOQSIfPXZust8Ukmu7SHm/cKtW61ph/1HyjN7hAgjM/Ua60eTQ HgYg1oU8cxKVgj1m0omuHeGExt2egAWOYFP8EPNZZ3sjBKX9JOJFYiRQWvuj8WrMrICh x3A1AQxQuhnAUCVjJpaSHa9eVlwnh4HLI2J7pJUq9blQSU8qtpyXEozOlEM1oWC2KcUw JvvXurTQN78qa9JkITzanYY2Q4ke4UCW6fm5PiyslYUfPTfhlQjK2usgdOYyiGUJhA1l +2bQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ziL0eDO+Itprb1jVyXzk432mqBLHi0A8HJSQe35XEnE=; b=mqsVlvnKj9FBEbqYswQoPVk7kVH3UOPGwM7+xZNYHeR3KIdD1JggK7M6WAYpKOX7qo VPgCBF2jV24NjtrZm5BkFrieh2v/OJrNRnxvxYwWWm4cUtkPG4P9O348TjZ8JQfkqPIY yCJBkOVJd7nfPgj1qCT/ihb4fpNU5jvNh4XquiEmkcVCBHFcKW+FYvCf7g1KGXdn+fvJ /mykuGbQl1kr2LT2SHCb4PnmY+BQ6VshYk5AcBxNJ2BOOO6u2Ohi33bSAb//n6e3upIx L7koRp6bFc/NTnHYoaM7jtGxlP8WYRpI6p5TNas62PgQggQSLGjWQXW4qMnoQPJLERIi GVDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="X/zFVBe4"; 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=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a05640226cc00b0043bbb57cedfsi6152848edd.112.2022.07.22.02.56.47; Fri, 22 Jul 2022 02:57:13 -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=@163.com header.s=s110527 header.b="X/zFVBe4"; 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=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236715AbiGVJmZ (ORCPT + 99 others); Fri, 22 Jul 2022 05:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234422AbiGVJmD (ORCPT ); Fri, 22 Jul 2022 05:42:03 -0400 Received: from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 72A9710B5 for ; Fri, 22 Jul 2022 02:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=ziL0e DO+Itprb1jVyXzk432mqBLHi0A8HJSQe35XEnE=; b=X/zFVBe41Y0YfBHGZegYs wYUKRLbDDxZ+9aR6NbLN1mXUlqNtMBUkvw/+FgFFuTCHKflUFKIU3Jc5gVXBQDkX P/ROprVSwK0EpS0rhBTYffeh6nZeK03Zk2nc2At9SIzuLhovr3fcxjvUV1CqulyV hVjkjaNDPaV6lfAKaFMQSM= Received: from localhost.localdomain (unknown [123.58.221.99]) by smtp2 (Coremail) with SMTP id GtxpCgDHafRNbtpiOJJjQg--.3043S2; Fri, 22 Jul 2022 17:30:54 +0800 (CST) From: williamsukatube@163.com To: qiang.zhao@nxp.com, leoyang.li@nxp.com, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: William Dean , Hacash Robot Subject: [PATCH] soc: fsl: qe: Add check for platform_driver_register Date: Fri, 22 Jul 2022 17:30:51 +0800 Message-Id: <20220722093051.2939076-1-williamsukatube@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GtxpCgDHafRNbtpiOJJjQg--.3043S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr4DCF47Gry3ZFyDur15urg_yoWDJrX_Cw 4rW3W7Xr4kWF93GF17tw43Z3s29FsYvrnaqa10qasxta4xJw47Xan8ZF43C3WkXrs5XFWD GrnxZrySkw13WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5MMKtUUUUU== X-Originating-IP: [123.58.221.99] X-CM-SenderInfo: xzlozx5dpv3yxdwxuvi6rwjhhfrp/1tbiNw5Gg1WBo2SbIQAAsV X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 From: William Dean As platform_driver_register() could fail, it should be better to deal with the return value in order to maintain the code consisitency. Fixes: be7ecbd240b2f ("soc: fsl: qe: convert QE interrupt controller to platform_device") Reported-by: Hacash Robot Signed-off-by: William Dean --- drivers/soc/fsl/qe/qe_ic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index bbae3d39c7be..f17de6000ff2 100644 --- a/drivers/soc/fsl/qe/qe_ic.c +++ b/drivers/soc/fsl/qe/qe_ic.c @@ -481,7 +481,6 @@ static struct platform_driver qe_ic_driver = static int __init qe_ic_of_init(void) { - platform_driver_register(&qe_ic_driver); - return 0; + return platform_driver_register(&qe_ic_driver); } subsys_initcall(qe_ic_of_init); -- 2.25.1