Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] variable name is never null, so remove null check

The variable name is always assigned to a literal string in the
proceeding switch statement, so it is never null and hence the
null check is redundant. Remove null the check.

Signed-off-by: Colin Ian King <colin.king@canonical.com>

authored by

Colin Ian King and committed by
Mauro Carvalho Chehab
69117994 06c24f67

-1
-1
drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
··· 116 116 } 117 117 pvr2_sysfs_trace("pvr2_sysfs(%p) show_type(cid=%d) is %s", 118 118 cip->chptr, cip->ctl_id, name); 119 - if (!name) return -EINVAL; 120 119 return scnprintf(buf, PAGE_SIZE, "%s\n", name); 121 120 } 122 121