Function atmel_hlcdc_attach_endpoint() defined in drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c returns -ENODEV when function devm_kzalloc() fails. Codes related to this bug are shown as follows. drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c: 34 static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint) 35 { ... 44 return ret; 45 46: encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL); 47 if (!encoder) 48 return -EINVAL; // should return -ENOMEM Thanks for attention! JW, ZG IMChecker Group, THU