From patchwork Mon Jul 30 02:45:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10548375 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2870E112B for ; Mon, 30 Jul 2018 02:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DEF2287BF for ; Mon, 30 Jul 2018 02:37:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01F7A287F9; Mon, 30 Jul 2018 02:37:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2F93287EA for ; Mon, 30 Jul 2018 02:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725816AbeG3EKP (ORCPT ); Mon, 30 Jul 2018 00:10:15 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10175 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725811AbeG3EKP (ORCPT ); Mon, 30 Jul 2018 00:10:15 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9FC273C08A0A6; Mon, 30 Jul 2018 10:37:27 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Mon, 30 Jul 2018 10:37:22 +0800 From: Wei Yongjun To: Zhang Rui , Eduardo Valentin , Miquel Raynal CC: Wei Yongjun , , Subject: [PATCH -next v2] thermal: armada: fix copy-paste error in armada_thermal_probe() Date: Mon, 30 Jul 2018 02:45:17 +0000 Message-ID: <1532918717-46808-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1532918508-45980-1-git-send-email-weiyongjun1@huawei.com> References: <1532918508-45980-1-git-send-email-weiyongjun1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the retrn value check which testing the wrong variable in armada_thermal_probe(). Fixes: e72f03ef2543 ("thermal: armada: use the resource managed registration helper alternative") Signed-off-by: Wei Yongjun --- v1 - > v2: fix typo of patch subject --- drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 8de4ba5..a269482 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -610,7 +610,7 @@ static int armada_thermal_probe(struct platform_device *pdev) return -ENOMEM; drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); - if (!priv) + if (!drvdata) return -ENOMEM; priv->dev = &pdev->dev;