t_chdev the rc assignment to PTR_ERR at fail cases of class_create and device_create are missed out, return proper error rather than returning -ENODEV. Signed-off-by: Devendra Naga Signed-off-by: Greg Kroah-Hartman ïS”–"x