From nobody Tue Apr 7 08:08:52 2026 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 6A1D1C4332F for ; Thu, 13 Oct 2022 13:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiJMNNm (ORCPT ); Thu, 13 Oct 2022 09:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbiJMNNc (ORCPT ); Thu, 13 Oct 2022 09:13:32 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EECD15E0C3 for ; Thu, 13 Oct 2022 06:13:31 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mp8ws0BhqzVj8H; Thu, 13 Oct 2022 21:09:01 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 13 Oct 2022 21:13:29 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 13 Oct 2022 21:13:28 +0800 From: Yang Yingliang To: CC: , , Subject: [PATCH] platform/loongarch: laptop: simplify return of generic_subdriver_init() Date: Thu, 13 Oct 2022 21:12:56 +0800 Message-ID: <20221013131256.776370-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The error code in generic_subdriver_init() is always negative, the return of generic_subdriver_init() can be simplified. Signed-off-by: Yang Yingliang --- drivers/platform/loongarch/loongson-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platfor= m/loongarch/loongson-laptop.c index a665fd1042ac..572290abf151 100644 --- a/drivers/platform/loongarch/loongson-laptop.c +++ b/drivers/platform/loongarch/loongson-laptop.c @@ -523,7 +523,7 @@ static int __init generic_subdriver_init(struct generic= _sub_driver *sub_driver) =20 err_out: generic_subdriver_exit(sub_driver); - return (ret < 0) ? ret : 0; + return ret; } =20 static void generic_subdriver_exit(struct generic_sub_driver *sub_driver) --=20 2.25.1