From: Colin Ian King Date: Tue, 6 Sep 2016 12:44:09 +0000 (-0300) Subject: [media] variable name is never null, so remove null check X-Git-Tag: v5.15~10718^2~1325 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69117994aa7d9dba8ea3bcdde7676b123d975877;p=platform%2Fkernel%2Flinux-starfive.git [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 --- diff --git a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c index 06fe63c..d977976 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c @@ -116,7 +116,6 @@ static ssize_t show_type(struct device *class_dev, } pvr2_sysfs_trace("pvr2_sysfs(%p) show_type(cid=%d) is %s", cip->chptr, cip->ctl_id, name); - if (!name) return -EINVAL; return scnprintf(buf, PAGE_SIZE, "%s\n", name); }