V4L/DVB (4233): Don't print empty enum values in pvrusb2-sysfs.c
authorMike Isely <isely@pobox.com>
Sun, 25 Jun 2006 23:04:13 +0000 (20:04 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 27 Jun 2006 03:17:19 +0000 (00:17 -0300)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-sysfs.c

index c756b98450564342423245261f93ebbd48855457..b999d4eaefff0850d2e020a710c7ec55fb71fe79 100644 (file)
@@ -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';