From: Mike Isely Date: Sun, 25 Jun 2006 23:04:13 +0000 (-0300) Subject: V4L/DVB (4233): Don't print empty enum values in pvrusb2-sysfs.c X-Git-Tag: v2.6.18-rc1~477^2~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4588677121d894ec989e938129da4ae02d332b6c;p=linux-2.6-omap-h63xx.git V4L/DVB (4233): Don't print empty enum values in pvrusb2-sysfs.c Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index c756b984505..b999d4eaeff 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/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';