From patchwork Mon Feb 6 14:24:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9558123 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 700B260413 for ; Mon, 6 Feb 2017 14:25:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60B1D27C05 for ; Mon, 6 Feb 2017 14:25:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 555F027F82; Mon, 6 Feb 2017 14:25:15 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 1DE1127C05 for ; Mon, 6 Feb 2017 14:25:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbdBFOZI (ORCPT ); Mon, 6 Feb 2017 09:25:08 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36176 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbdBFOYz (ORCPT ); Mon, 6 Feb 2017 09:24:55 -0500 Received: by mail-pg0-f68.google.com with SMTP id 75so9234749pgf.3 for ; Mon, 06 Feb 2017 06:24:50 -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=heWwjYVHH0AIJ0Jg09T78/wzjmYMZxZNpBTCSZ/0S6s=; b=ZBbfOWiJ1hTPTxXLWi3Hl82v1eFiBI3CLQSG77GuiAxUucoRuF7tgEO316lbCuXZzM 0FgKAxsDFRbEHFH4YDNGBZuzloT6LsPGjV31wEeTSdOcV+zQ5b5pmafieGs/41p+BPa+ w7twrgC/oKTaAL/1Yqmk5IErs85IYBxAhIc3OkXfFmu9jqswmdTKtGjlEGi+YTQ945TG sqZ3ndYmy2NfGxioif9IOXlTbBlFQ0JgF5D9J4p6kwrhPnktId50i4USb2Q5+2N4WWEH +/wFyTIXKTx1kPNuZo5rqpcRNf++DIz0Y74njIAt+wV1KJDrP6k9TllHNHmdwDKxVg2A PyZw== 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=heWwjYVHH0AIJ0Jg09T78/wzjmYMZxZNpBTCSZ/0S6s=; b=mZ2XKVE5g1EX0hhW79SbAuHofyiJC05kUwkQVkV17SwGW4MaBsnSik0LLZ11X6WSzU Kz9vg6+zRCC34RIuYGDnzbrgaqpZfnrZcyB7EGAJkK1mAkvSUH64lSdl35fz0JFUjof0 sYFrdL6VpQsqJC2+uwAFi6Lh4mZvGJ7DGmGKmFznepoAU+gi74nf6+a7TD86UXJHAxKW EZYngC62nEPwpFJymoJNr72Rrs8C+Wl9BCAm1ZCNzGHEOjCzotCHc/YwTiFvHg8qqTmm I7EnZaFK75lJ/pjvb48fkeB6L1CcKzJZJ1fWxGNkeIs+6PR6MwEGAVSJMmYrtQfkU7mh 0sfA== X-Gm-Message-State: AIkVDXLvztuQ8UbocPLITWoV0NBA9+d2JsiaFl+/GyPZpDJeRs1qsJy0fHR1MX2Ze0lQ/Q== X-Received: by 10.98.32.7 with SMTP id g7mr13280545pfg.119.1486391090104; Mon, 06 Feb 2017 06:24:50 -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 w76sm3179522pfd.74.2017.02.06.06.24.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 06:24:49 -0800 (PST) From: Wei Yongjun To: Bartlomiej Zolnierkiewicz , Kees Cook , Geert Uytterhoeven Cc: Wei Yongjun , linux-fbdev@vger.kernel.org Subject: [PATCH -next] video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe() Date: Mon, 6 Feb 2017 14:24:44 +0000 Message-Id: <20170206142444.27505-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 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 -ENODEV 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 --- 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 = -ENODEV; goto err1; + } error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source); if (error) {