Explorar el Código

drm: fix sysfs error path.

Pointed out by Roel Kluin on dri-devel.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie hace 16 años
padre
commit
38eda21189
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/gpu/drm/drm_sysfs.c

+ 1 - 1
drivers/gpu/drm/drm_sysfs.c

@@ -184,7 +184,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
 err_out_files:
 err_out_files:
 	if (i > 0)
 	if (i > 0)
 		for (j = 0; j < i; j++)
 		for (j = 0; j < i; j++)
-			device_remove_file(&minor->kdev, &device_attrs[i]);
+			device_remove_file(&minor->kdev, &device_attrs[j]);
 	device_unregister(&minor->kdev);
 	device_unregister(&minor->kdev);
 err_out:
 err_out: