From: Cheah Kok Cheong Date: Fri, 30 Dec 2016 11:27:41 +0000 (+0800) Subject: Staging: comedi: proc: Warn if unable to create proc entry X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e4b5cd641056ca58836502cde1613eb6a375f2a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Staging: comedi: proc: Warn if unable to create proc entry The proc entry is not essential for the comedi system as evident by the support for !CONFIG_PROC_FS. So for failure to create, just warn and continue loading. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/proc.c b/drivers/staging/comedi/proc.c index 99b23b2e32dd..2644dd4d6143 100644 --- a/drivers/staging/comedi/proc.c +++ b/drivers/staging/comedi/proc.c @@ -89,7 +89,8 @@ static const struct file_operations comedi_proc_fops = { void __init comedi_proc_init(void) { - proc_create("comedi", 0444, NULL, &comedi_proc_fops); + if (!proc_create("comedi", 0444, NULL, &comedi_proc_fops)) + pr_warn("comedi: unable to create proc entry\n"); } void comedi_proc_cleanup(void)