Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a1b0714 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Dave Airlie
Browse files

drm: Don't initialize local ret variable when not needed

parent 7eb3b2c8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1829,7 +1829,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
	struct drm_display_mode *mode = NULL;
	struct drm_mode_set set;
	uint32_t __user *set_connectors_ptr;
	int ret = 0;
	int ret;
	int i;

	if (!drm_core_check_feature(dev, DRIVER_MODESET))
@@ -2248,7 +2248,7 @@ int drm_mode_addfb2(struct drm_device *dev,
	struct drm_mode_fb_cmd2 *r = data;
	struct drm_mode_config *config = &dev->mode_config;
	struct drm_framebuffer *fb;
	int ret = 0;
	int ret;

	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return -EINVAL;
@@ -2403,7 +2403,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
	struct drm_framebuffer *fb;
	unsigned flags;
	int num_clips;
	int ret = 0;
	int ret;

	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return -EINVAL;
@@ -2602,7 +2602,7 @@ int drm_mode_attachmode_ioctl(struct drm_device *dev,
	struct drm_display_mode *mode;
	struct drm_mode_object *obj;
	struct drm_mode_modeinfo *umode = &mode_cmd->mode;
	int ret = 0;
	int ret;

	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return -EINVAL;
@@ -2656,7 +2656,7 @@ int drm_mode_detachmode_ioctl(struct drm_device *dev,
	struct drm_connector *connector;
	struct drm_display_mode mode;
	struct drm_mode_modeinfo *umode = &mode_cmd->mode;
	int ret = 0;
	int ret;

	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return -EINVAL;
@@ -3065,7 +3065,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
					    struct edid *edid)
{
	struct drm_device *dev = connector->dev;
	int ret = 0, size;
	int ret, size;

	if (connector->edid_blob_ptr)
		drm_property_destroy_blob(dev, connector->edid_blob_ptr);
+1 −1
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
	int count = 0, ro, fail = 0;
	struct drm_crtc_helper_funcs *crtc_funcs;
	struct drm_mode_set save_set;
	int ret = 0;
	int ret;
	int i;

	DRM_DEBUG_KMS("\n");
+4 −4
Original line number Diff line number Diff line
@@ -220,18 +220,18 @@ int drm_load_edid_firmware(struct drm_connector *connector)
{
	char *connector_name = drm_get_connector_name(connector);
	char *edidname = edid_firmware, *last, *colon;
	int ret = 0;
	int ret;

	if (*edidname == '\0')
		return ret;
		return 0;

	colon = strchr(edidname, ':');
	if (colon != NULL) {
		if (strncmp(connector_name, edidname, colon - edidname))
			return ret;
			return 0;
		edidname = colon + 1;
		if (*edidname == '\0')
			return ret;
			return 0;
	}

	last = edidname + strlen(edidname) - 1;
+1 −4
Original line number Diff line number Diff line
@@ -383,7 +383,6 @@ int drm_fb_helper_init(struct drm_device *dev,
		       int crtc_count, int max_conn_count)
{
	struct drm_crtc *crtc;
	int ret = 0;
	int i;

	fb_helper->dev = dev;
@@ -408,10 +407,8 @@ int drm_fb_helper_init(struct drm_device *dev,
				sizeof(struct drm_connector *),
				GFP_KERNEL);

		if (!fb_helper->crtc_info[i].mode_set.connectors) {
			ret = -ENOMEM;
		if (!fb_helper->crtc_info[i].mode_set.connectors)
			goto out_free;
		}
		fb_helper->crtc_info[i].mode_set.num_connectors = 0;
	}

+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ drm_gem_create_mmap_offset(struct drm_gem_object *obj)
	struct drm_gem_mm *mm = dev->mm_private;
	struct drm_map_list *list;
	struct drm_local_map *map;
	int ret = 0;
	int ret;

	/* Set the object up for mmap'ing */
	list = &obj->map_list;
Loading