From patchwork Mon Feb 6 15:08: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: 9558187 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 90F7060413 for ; Mon, 6 Feb 2017 15:08:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8015422638 for ; Mon, 6 Feb 2017 15:08:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 748D327F88; Mon, 6 Feb 2017 15:08:37 +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 C727922638 for ; Mon, 6 Feb 2017 15:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbdBFPIg (ORCPT ); Mon, 6 Feb 2017 10:08:36 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36341 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbdBFPIf (ORCPT ); Mon, 6 Feb 2017 10:08:35 -0500 Received: by mail-pf0-f195.google.com with SMTP id 19so7077479pfo.3 for ; Mon, 06 Feb 2017 07:08:35 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=g/6OlhPctWX5lkDiYWwjronMyIIK+PmA8R52ZRX2lNs=; b=QpXN5XS9lLihdo26yc4rYlRRr5GZ/KOz4I4VRPhVtv9DnSl4BSOqIXq68JgHfuOdfC 9sVgUr/OIgMvkArW0erv+0msg22Z8v+PHahwkSDJcHKU7eQFNWZ+vgfSeJEU33WFZFZK sSdxKTVDSATOPchu+6Qzll2KB6ichxhyLezUocMi89mz61iyvu0r6mk0wb/p9bv8rWU9 I7xEPZigmhxc7C/Oyisab7Vz8HNoKSJ10c1ebFFMcGwyAQf9pW6ucKboqmEryHxPWR8u p3N+mKGSb0y4XqQ/43+K3LlaoqJ4cx5ttt1yltQTAjW4vi7UYh/GRDU2ewbbILrItzvJ 55vw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=g/6OlhPctWX5lkDiYWwjronMyIIK+PmA8R52ZRX2lNs=; b=jdWpq15ddB6sHFUgiDgura1M/dP0DXpt1HamHOfTHhUs6w3TGQY77opulvEGF0c5an Ssuq40M/noEOspsQHN/OPsTaM4TS0Hbx/zNJ7ED7TTZ3Sba4xJIPGd1hQzmp17FL8ThF s/TcC8PyAQ2T5rs0k647sdQoX4jz6ptjJ//p4le795R4lJ54pbkQHCYO3uu1zAtYpbao MHt8Ihqmfl5+Q/vBwt6uAKoim9jBdMr8p1+VAfImfPXQa8sA8fGCPIgKcaoDlK+5W1/d HqLeuWRaVrjrBvDUGxBsR+oVv820HbvGBDv0VJEfNXX9EV8opB9U8z7AmrG0itVARFkC rRJQ== X-Gm-Message-State: AIkVDXJ7BM/F8M06GHeSwyOXHByOTsKpdhozoLNtGMok5vCo0DFvy/RfuA0ap7iHVv85UA== X-Received: by 10.84.128.34 with SMTP id 31mr18342426pla.17.1486393714758; Mon, 06 Feb 2017 07:08:34 -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 k184sm3531404pgc.23.2017.02.06.07.08.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 07:08:34 -0800 (PST) From: Wei Yongjun To: Bartlomiej Zolnierkiewicz , Kees Cook , Geert Uytterhoeven Cc: Wei Yongjun , linux-fbdev@vger.kernel.org Subject: [PATCH -next v2] video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe() Date: Mon, 6 Feb 2017 15:08:26 +0000 Message-Id: <20170206150826.28634-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170206142444.27505-1-weiyj.lk@gmail.com> References: <20170206142444.27505-1-weiyj.lk@gmail.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return error code -ENOMEM from the ioremap_nocache() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Geert Uytterhoeven --- v1->v2: use -ENOMEM intead of -ENODEV --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" 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/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 93469f9..ea8b6d5 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -2782,8 +2782,10 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) priv->forced_fourcc = pdata->ch[0].fourcc; priv->base = ioremap_nocache(res->start, resource_size(res)); - if (!priv->base) + if (!priv->base) { + error = -ENOMEM; goto err1; + } error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source); if (error) {