Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6080707ybv; Tue, 18 Feb 2020 09:29:10 -0800 (PST) X-Google-Smtp-Source: APXvYqznaZGeyL9X73LCSvvmffmoeiGc4mtlASssM3919mavGen7hswEZwtpwMNnhC7NcDvnYc1J X-Received: by 2002:a9d:6196:: with SMTP id g22mr16984812otk.204.1582046950571; Tue, 18 Feb 2020 09:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582046950; cv=none; d=google.com; s=arc-20160816; b=AzF4homXoIE1rqJGiWRL42rfHVMzq6Eyb4tYsK9npsFdNJ3QwF7BR/qTxX7Kx2HmUV gpMvl3Los7+n0EkiDIpZtSboRde0oZFlwhSJ+qnBJ4myNmeIu+vVQBrx3g7E+IQkf95T 8gcztyxfobM1nJoPlNH+JGonbJNcR0XiwBe1C5XdBDYhhMHj7Xgvx2rZSFf1Cuq5t/c6 nI1zMHUDwhk4nGQdEOy24MAKlmfuFClWo1RIe4W1z+JTZNFFXi5ROM3a8WM2APbjsQ5T LhagTgdEHQzfbk9DuuSpxz8ZNdRRuh2uav77oYJMSls5Aeoh1Qph+wtUGtQVK3OVPjXK 6SLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zS4ft/vYKXfE+WleANo6vegk5u6xXjxUfiyGUHRUqRQ=; b=xJAiokoMZuxqLY5w3ORtBfu1Lg3BfTPLk8A5y3jo0ImhXS7W5DeOcCV/1gpaO9s9kT LdaXMyoA7OZmfB+VC3/gBJqTu7RC3EAEVcZa7Slfy+aGZ2G0bvNRSQ3XBlNnJniiweyQ e2zU61bacL0vQkrXHWI84yWP2a+2rPPOmkVZAfrwMSit4IjalyEtj3Kbc7Gj8HkEvutx IrydO10AX+Nw06GE+2NAIIosNcc84jJLxqOTMToOMqTN2GuYTyQXFgupE+XR9/U3FHtO Rz23346BMLJylKCNUF4DWEsyhmg1vGwKx37JthKRYZg70kxdMewmtcNAOzChDZ9biX8A i7vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pGq8d6zw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si1906446otm.221.2020.02.18.09.28.58; Tue, 18 Feb 2020 09:29:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pGq8d6zw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbgBRR2m (ORCPT + 99 others); Tue, 18 Feb 2020 12:28:42 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33625 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbgBRR2m (ORCPT ); Tue, 18 Feb 2020 12:28:42 -0500 Received: by mail-wr1-f67.google.com with SMTP id u6so25024573wrt.0 for ; Tue, 18 Feb 2020 09:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zS4ft/vYKXfE+WleANo6vegk5u6xXjxUfiyGUHRUqRQ=; b=pGq8d6zwYjI+mQ8QceGCxr+PYF4+sY/8o7MKXhSYEtFsh3Nid96TVjuWpqbhbWrsq3 VcC16WuLlI64bW2I99sbde/ZvK2hUlUqyc5ohpZFEuEc1KwE6YzriPJaSbE21HnM2DZG hWYDyojjafNov+pYyrxUFeTvw7PbrLFy4EceYgXNeE77/2HQNEpP8dqZt+KcgX7PZlAw Os0pCO/kkeAv+AUQD6COIADNj6qpTydR30o/F9+LXZo/twTAt6GHx+He9UogRiRR8ICW S2sATrpiY/ftoJ94+N3mykphyzwKFput3dIrOIULe3pY6+NKQ0k5Zhz8VudbvZ3NEhBZ /6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zS4ft/vYKXfE+WleANo6vegk5u6xXjxUfiyGUHRUqRQ=; b=tWTgBEL1rqveZHRNBsujwL8xE2JA94IrrvgZxO6g86Dfnb4HNaV8VTosVgbFMH2Xr+ br4Qykey4Cy6fq2zxdhkEm8koyKwc0Cd6cTKMzJ1KzEKC4IFCDCjyFiqoObioD4DhXcO XN19t32cgHDFMgs9o0wxPdiSabCRJSefMwIn66F8q0hWht8jwIn9UwR1Qr3rjDtFo84K rIBWPJ2l2PKOUNLwYBibO6j4G5jbIkog3kqHywPiLnoVGcCrBCB0XzH4I+/JiQL2JiAx uI/C+d1Yz8Yort4jRfxL2rpfJX2QTW2dQ8OuYuQHJLYHxqa8b7uWFO0hpPPw7ghtrFQ3 lsfA== X-Gm-Message-State: APjAAAUn0S7QcsJaoflGZmepcJRGxMPGiwaNY5lLFzvPtkfJoWPtgHRj MBTAEu3aR3KULmqdTATzTejd3Y56cLQ= X-Received: by 2002:a5d:6087:: with SMTP id w7mr29565396wrt.36.1582046919627; Tue, 18 Feb 2020 09:28:39 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id t13sm6998757wrw.19.2020.02.18.09.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 09:28:39 -0800 (PST) From: Wambui Karuga To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH 1/2] drm/debugfs: remove checks for return value of drm_debugfs functions. Date: Tue, 18 Feb 2020 20:28:14 +0300 Message-Id: <20200218172821.18378-3-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218172821.18378-1-wambui.karugax@gmail.com> References: <20200218172821.18378-1-wambui.karugax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As there is no need to check the return value of drm_debugfs_create_files, remove unnecessary checks and error handling statement blocks. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/drm_debugfs.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 4e673d318503..6a2f141b6a38 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -215,35 +215,17 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id, sprintf(name, "%d", minor_id); minor->debugfs_root = debugfs_create_dir(name, root); - ret = drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES, - minor->debugfs_root, minor); - if (ret) { - debugfs_remove(minor->debugfs_root); - minor->debugfs_root = NULL; - DRM_ERROR("Failed to create core drm debugfs files\n"); - return ret; - } + drm_debugfs_create_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); if (drm_drv_uses_atomic_modeset(dev)) { - ret = drm_atomic_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create atomic debugfs files\n"); - return ret; - } + drm_atomic_debugfs_init(minor); } if (drm_core_check_feature(dev, DRIVER_MODESET)) { - ret = drm_framebuffer_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create framebuffer debugfs file\n"); - return ret; - } + drm_framebuffer_debugfs_init(minor); - ret = drm_client_debugfs_init(minor); - if (ret) { - DRM_ERROR("Failed to create client debugfs file\n"); - return ret; - } + drm_client_debugfs_init(minor); } if (dev->driver->debugfs_init) { -- 2.25.0