Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758564AbYHIHOS (ORCPT ); Sat, 9 Aug 2008 03:14:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752218AbYHIHOH (ORCPT ); Sat, 9 Aug 2008 03:14:07 -0400 Received: from server78.greatnet.de ([83.133.96.102]:39451 "EHLO server78.greatnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbYHIHOG (ORCPT ); Sat, 9 Aug 2008 03:14:06 -0400 X-Greylist: delayed 1172 seconds by postgrey-1.27 at vger.kernel.org; Sat, 09 Aug 2008 03:14:06 EDT Message-ID: <489D3F20.6000203@nachtwindheim.de> Date: Sat, 09 Aug 2008 08:54:24 +0200 From: Henne User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: mchehab@infradead.org CC: video4linux-list@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH] V4L: fix return value of register video func Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 26 From: Henrik Kretzschmar Signed-off-by: Henrik Kretzschmar If a wrong device type is used with video_register_device_index() it should better return an error number, instead of a constant. diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 6f36006..0320fb8 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -281,7 +281,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, default: printk(KERN_ERR "%s called with unknown type: %d\n", __func__, type); - return -1; + return -EINVAL; } /* pick a minor number */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/