Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp204475iob; Wed, 11 May 2022 12:32:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPaGu5yyciOkx8yQAoy4fLDhl74lLU8FQb3xGKXvQlcosXq0dbSh765YuKKgbIOyqi3R2R X-Received: by 2002:a05:6a00:1891:b0:50d:e6e7:acae with SMTP id x17-20020a056a00189100b0050de6e7acaemr26992503pfh.26.1652297566330; Wed, 11 May 2022 12:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652297566; cv=none; d=google.com; s=arc-20160816; b=uladPjc8KAJBQ2IEtQ4FyOqUdCi600TXy7QC1j+V2mF9P0s4d0otFaMOGwsWgXKYRY /S0TBCcRASkGhvqr0RcAhXvHCeje/pmSok5iUqhAuzhfe6bMYn9ChypYRdbPYrGVko7P ZD1zycGGXytcOvQfDYAaXPpteSUQ7UIysBIkFh6/VgjQ7hnnD00YhCJUc4s/KEC59snS tVxdTuVFQXZ3dbI7H/gYYnbToNfdm6369EdcOz+1rQmveSrgc3vbzNf6UjaoqL/s+oD9 LnWLAesNtlMQ+/5NbJ5gpZDfcAT/7fl25Vfmr9HZV8i3WHJezZAn7SBCfM1TWsK2WdLV czfQ== 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; bh=Sv/IWmqwTPHSMAI1ZLlpPBeFNOVlUUA/XSR/M7Y7cDI=; b=G+MakvRJ6ZikvGDsankOzMVrQv5DRTn3tY7dgkj39taIk7xQWjyhOd8ZykzG4a0EuH 0EJUPKJ1nQuxXdQdTfXOQOHAS0Gg92yGq79bN8FoN2tsjNFte8Qkw/phDFwXKZhUHIUT ES841R2Um7fObaBZzRnPuySlRPz+PZtaSGEYq2B4RKdIf36xo7AICmwKbtfs1BXV8g5m nGuADnjcV3R2pi0YfBGn1Oc6BZ9ShMaum9tay2BTCBJuvdO8UGi0AX5yOTqtxk72Y4Ws RvYYYOY9bkBT7ciubcUC0Atqrx7WC5iWFAD2bGaQdTAHSBjsMVP08vHqGBSRyflhJFqN ypsw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x34-20020a17090a6c2500b001cb95c53172si758612pjj.78.2022.05.11.12.32.29; Wed, 11 May 2022 12:32:46 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242720AbiEKIv1 (ORCPT + 99 others); Wed, 11 May 2022 04:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244089AbiEKIvH (ORCPT ); Wed, 11 May 2022 04:51:07 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11CDD3703E for ; Wed, 11 May 2022 01:51:04 -0700 (PDT) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KypRC389wzCsYw; Wed, 11 May 2022 16:46:15 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 16:51:02 +0800 From: Zheng Bin To: , , , , CC: , Subject: [PATCH -next] ARM: davinci: da850-evm: add missing platform_device_unregister in da850_lcd_hw_init Date: Wed, 11 May 2022 17:04:56 +0800 Message-ID: <20220511090456.3428850-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 da850_lcd_hw_init misses a call platform_device_unregister in error path, this patch fixes that. Signed-off-by: Zheng Bin --- arch/arm/mach-davinci/board-da850-evm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index efc26b472ef8..7b2a1a37e5c0 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -873,8 +873,10 @@ static int da850_lcd_hw_init(void) return PTR_ERR(backlight); status = platform_device_register(&da850_lcd_supply_device); - if (status) + if (status) { + platform_device_unregister(backlight); return status; + } return 0; } -- 2.31.1