Browse Source

V4L/DVB (4233): Don't print empty enum values in pvrusb2-sysfs.c

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Mike Isely 19 years ago
parent
commit
4588677121
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/media/video/pvrusb2/pvrusb2-sysfs.c

+ 1 - 0
drivers/media/video/pvrusb2/pvrusb2-sysfs.c

@@ -189,6 +189,7 @@ static ssize_t show_enum(int id,struct class_device *class_dev,char *buf)
 	bcnt = 0;
 	for (val = 0; val < ecnt; val++) {
 		pvr2_ctrl_get_valname(cptr,val,buf+bcnt,PAGE_SIZE-bcnt,&ccnt);
+		if (!ccnt) continue;
 		bcnt += ccnt;
 		if (bcnt >= PAGE_SIZE) break;
 		buf[bcnt] = '\n';