From 5f454d82e5958e59c16580b9b4531f4bbc7231f7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 29 May 2013 03:55:15 -0300 Subject: [media] hdpvr: improve error handling get_video_info() should never return EFAULT, instead it should return the low-level usb_control_msg() error. Add a valid field to the hdpvr_video_info struct so the driver can easily check if a valid format was detected. Whenever get_video_info is called and it returns an error (e.g. usb_control_msg failed), then return that error to userspace as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/hdpvr/hdpvr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/usb/hdpvr/hdpvr.h') diff --git a/drivers/media/usb/hdpvr/hdpvr.h b/drivers/media/usb/hdpvr/hdpvr.h index 808ea7a..dc685d4 100644 --- a/drivers/media/usb/hdpvr/hdpvr.h +++ b/drivers/media/usb/hdpvr/hdpvr.h @@ -154,6 +154,7 @@ struct hdpvr_video_info { u16 width; u16 height; u8 fps; + bool valid; }; enum { -- cgit v1.1