From patchwork Mon Feb 6 16:09:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9558285 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3E3460242 for ; Mon, 6 Feb 2017 16:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B52BF23F88 for ; Mon, 6 Feb 2017 16:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A79F127C05; Mon, 6 Feb 2017 16:09:34 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 4726923F88 for ; Mon, 6 Feb 2017 16:09:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754446AbdBFQJd (ORCPT ); Mon, 6 Feb 2017 11:09:33 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35818 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754457AbdBFQJc (ORCPT ); Mon, 6 Feb 2017 11:09:32 -0500 Received: by mail-pf0-f196.google.com with SMTP id f144so7186161pfa.2 for ; Mon, 06 Feb 2017 08:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AjnO6rnRoLMtUurPIOocoQ9AstM1RBPRh0AFcxm51EA=; b=ngLByArfNjkRMbOKRGzMAcWtLQgEvipH5+V2ikG0cNyc6yMAt0ih0WG8fXQ0bLz4jN RjQJ7W+kgc7+5znDWEgAyKgGiSyKhJtAG/4+xaOVdk7mbChtnL+Xk2YYFP6AuQluPzjZ QLRjC5e5S+h70V3OQww0JpIOMCYUdtGWnNkPudviFuhLH9gylLRIxyAi85a1Hze4MyPB qWetIND/ej/8XmjmYrG/krkFk86gYYW4/b8qPPyS3+XIk9MYxIMVaW3iqttDo9wzExyY v3vT7JSGfusJHdy+/WItV63eIhPDQEFY5bfb++4JeW9SpfCImFMWI1TV2MljzwaMFvrc QZag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AjnO6rnRoLMtUurPIOocoQ9AstM1RBPRh0AFcxm51EA=; b=MP519JPxy75pZSASSncM5/de1hq6u7yL+L9UOJV1rcFbSCiwD0knRdvNrrpYl3nsUt O4YZXZbPuiubIwmbJBiN3sxaClu5AF/+aI2HOPerGK8Cr0L6Py2PB8VnrYzHCTH42AK3 U1kr5Bmp8LgFoLq6byCcS/7yPvNMShboOdNnwUHUnY7JosDMpJtLbpZR8A/w/xCQuoUL knne4rgXb2GDqz1Dc9XHU7dcwQHZxyACYHkwZGtujaoxmrtBP0aX2ntSGsYxgGfrEKCm eO+PbDnKLf54el0EWMUsCqAfIHyrK0r1BC+Yn2EFqknAhJKjHtuOsERDtRY5Ddlp741s fBlA== X-Gm-Message-State: AIkVDXKfFXIAsZBJ0y7bhTnprqBy39xnm9Zu4Fyqz5/0gRo2EcI7sXXFFtOujtRBIuGjjw== X-Received: by 10.98.89.195 with SMTP id k64mr13893439pfj.126.1486397372085; Mon, 06 Feb 2017 08:09:32 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id 75sm3762977pfp.80.2017.02.06.08.09.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 08:09:31 -0800 (PST) From: Wei Yongjun To: Michael Turquette , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai Cc: Wei Yongjun , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH -next] clk: sunxi-ng: sun9i-a80: Fix wrong pointer passed to PTR_ERR() Date: Mon, 6 Feb 2017 16:09:26 +0000 Message-Id: <20170206160926.8274-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: 783ab76ae553 ("clk: sunxi-ng: Add A80 Display Engine CCU") Signed-off-by: Wei Yongjun --- drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c b/drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c index 3fc27db..6d11658 100644 --- a/drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c +++ b/drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c @@ -232,7 +232,7 @@ static int sun9i_a80_de_clk_probe(struct platform_device *pdev) rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); if (IS_ERR(rstc)) { - ret = PTR_ERR(bus_clk); + ret = PTR_ERR(rstc); if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "Couldn't get reset control: %d\n", ret);