From patchwork Fri Jun 12 13:59:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 6598861 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29612C0020 for ; Fri, 12 Jun 2015 13:59:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DECF2066D for ; Fri, 12 Jun 2015 13:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 450D82034A for ; Fri, 12 Jun 2015 13:59:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbbFLN7l (ORCPT ); Fri, 12 Jun 2015 09:59:41 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:30010 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbbFLN7l (ORCPT ); Fri, 12 Jun 2015 09:59:41 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-24.uk.mimecast.lan; Fri, 12 Jun 2015 14:59:38 +0100 Received: from login1.euhpc.arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Jun 2015 14:59:37 +0100 From: Vladimir Murzin To: linux-fbdev@vger.kernel.org Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, vladimir.murzin@arm.com Subject: [PATCH] fbdev: propagate result of fb_videomode_from_videomode() Date: Fri, 12 Jun 2015 14:59:19 +0100 Message-Id: <1434117559-32130-1-git-send-email-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.0.0 X-OriginalArrivalTime: 12 Jun 2015 13:59:37.0572 (UTC) FILETIME=[05047240:01D0A518] X-MC-Unique: 77ONDi7WRoSr64C4bmby8Q-1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fb_videomode_from_videomode() may fail, but of_get_fb_videomode() silently covers this fact. Instead, trow the error code to the caller. Signed-off-by: Vladimir Murzin --- drivers/video/fbdev/core/fbmon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 01ef1b9..d787533 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -1475,7 +1475,9 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb, if (ret) return ret; - fb_videomode_from_videomode(&vm, fb); + ret = fb_videomode_from_videomode(&vm, fb); + if (ret) + return ret; pr_debug("%s: got %dx%d display mode from %s\n", of_node_full_name(np), vm.hactive, vm.vactive, np->name);