From patchwork Thu Jul 26 20:19:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1244911 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D773FDFFCE for ; Thu, 26 Jul 2012 20:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465Ab2GZUTX (ORCPT ); Thu, 26 Jul 2012 16:19:23 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:61372 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752182Ab2GZUTW (ORCPT ); Thu, 26 Jul 2012 16:19:22 -0400 Received: by ghrr11 with SMTP id r11so2452113ghr.19 for ; Thu, 26 Jul 2012 13:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Z0pJ4uQqoB59Asc+L5gm5cLujm/PzaiS/4+H9QQ2K1g=; b=cEGwZtI90FLRU1bLUItmZc23YXUbvbUJct7QKij29iMnm4pWKf2lRzNWqL3cCcQXUm wFoAclkb8A5Gv1jG1bet/gF0bZ0v9DZOdhqxbk+HDU2rcjgKbJCm9rkZaYq6OUMb8TPO BQqXZL2tJ7769b40uzWBnSop37H8h+Q94AaiCvhYSElKf6Oyhq04vcwqtuf/4reVrA3o h1c699YqxlcfoWutSxaJ1L+IF85OZSmTibKwPoTW7TjKEXlH7BY7gJ7p9xcGNu/01egb AMvXxPIGFKjiLD0ar0/GUfbs+11zmjfWXixXm9XZFhhhiTu32en8bKIdoXlZJqolPiv+ ulYA== Received: by 10.236.187.1 with SMTP id x1mr28398331yhm.125.1343333962177; Thu, 26 Jul 2012 13:19:22 -0700 (PDT) Received: from localhost.localdomain (201-212-134-245.cab.prima.net.ar. [201.212.134.245]) by mx.google.com with ESMTPS id y66sm349025yhi.10.2012.07.26.13.19.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 13:19:21 -0700 (PDT) From: Ezequiel Garcia To: Mauro Carvalho Chehab Cc: , Ezequiel Garcia Subject: [PATCH] v4l-dev.c: Use 'ret' variable to return release() exit code Date: Thu, 26 Jul 2012 17:19:06 -0300 Message-Id: <1343333946-9893-1-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Commit 65d9ff9c85d3c2e06d22aed78efee8404563eff6: "V4L/DVB (11390): 2-dev.c: return 0 for NULL open and release callbacks", introduced this bug. The bug this patch fixes is almost innocuous because nobody really cares about release() exit code. Signed-off-by: Ezequiel Garcia --- drivers/media/video/v4l2-dev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index d13c47f..337c370 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -496,7 +496,7 @@ static int v4l2_release(struct inode *inode, struct file *filp) if (vdev->fops->release) { if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags)) mutex_lock(vdev->lock); - vdev->fops->release(filp); + ret = vdev->fops->release(filp); if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags)) mutex_unlock(vdev->lock); }