From patchwork Fri Jan 30 07:59:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Meerwald-Stadler X-Patchwork-Id: 5747481 Return-Path: X-Original-To: patchwork-linux-omap@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 54DCABF440 for ; Fri, 30 Jan 2015 08:06:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A226620165 for ; Fri, 30 Jan 2015 08:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5FA120225 for ; Fri, 30 Jan 2015 08:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbbA3IGJ (ORCPT ); Fri, 30 Jan 2015 03:06:09 -0500 Received: from ns.pmeerw.net ([84.19.176.92]:43971 "EHLO pmeerw.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681AbbA3IGI (ORCPT ); Fri, 30 Jan 2015 03:06:08 -0500 X-Greylist: delayed 376 seconds by postgrey-1.27 at vger.kernel.org; Fri, 30 Jan 2015 03:06:07 EST Received: from pmeerw.keymachine.de (pmeerw.net [84.19.176.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pmeerw@pmeerw.net) by pmeerw.net (Postfix) with ESMTPSA id AE7A955C02B8; Fri, 30 Jan 2015 08:59:47 +0100 (CET) From: Peter Meerwald To: linux-omap@vger.kernel.org Cc: tomi.valkeinen@ti.com, linux-fbdev@vger.kernel.org, Peter Meerwald Subject: [PATCH] omapfb: Return error code when applying overlay settings fails Date: Fri, 30 Jan 2015 08:59:46 +0100 Message-Id: <1422604786-6804-1-git-send-email-pmeerw@pmeerw.net> X-Mailer: git-send-email 1.7.10.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 the check of the return code is missing, user space does not get notified about the error condition: omapdss OVERLAY error: overlay 2 horizontally not inside the display area (403 + 800 >= 800) omapdss APPLY error: failed to apply settings: illegal configuration. Signed-off-by: Peter Meerwald --- drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c index 146b6f5..9ddfdd6 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c @@ -137,8 +137,11 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) goto undo; } - if (ovl->manager) - ovl->manager->apply(ovl->manager); + if (ovl->manager) { + r = ovl->manager->apply(ovl->manager); + if (r) + goto undo; + } if (pi->enabled) { r = ovl->enable(ovl);