aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-08 13:24:47 -0500
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-02-08 13:24:47 -0500
commit60d2fa0dad0687b4d227aacc042ccdbea1782d87 (patch)
tree2c32a6a4d09fe544eb4180e5ba4ef3d74048f7f0 /drivers/video/fbdev
parent1ea673ade7448db0f6f2fe423e72b84e33f653fe (diff)
fbdev: omap2: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/core.c31
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/dss.h2
2 files changed, 7 insertions, 26 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c
index b4bcf3a4a647..7e6a3eb266d0 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/core.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c
@@ -110,19 +110,12 @@ DEFINE_SHOW_ATTRIBUTE(dss);
110 110
111static struct dentry *dss_debugfs_dir; 111static struct dentry *dss_debugfs_dir;
112 112
113static int dss_initialize_debugfs(void) 113static void dss_initialize_debugfs(void)
114{ 114{
115 dss_debugfs_dir = debugfs_create_dir("omapdss", NULL); 115 dss_debugfs_dir = debugfs_create_dir("omapdss", NULL);
116 if (IS_ERR(dss_debugfs_dir)) {
117 int err = PTR_ERR(dss_debugfs_dir);
118 dss_debugfs_dir = NULL;
119 return err;
120 }
121 116
122 debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, 117 debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir,
123 &dss_debug_dump_clocks, &dss_fops); 118 &dss_debug_dump_clocks, &dss_fops);
124
125 return 0;
126} 119}
127 120
128static void dss_uninitialize_debugfs(void) 121static void dss_uninitialize_debugfs(void)
@@ -130,24 +123,18 @@ static void dss_uninitialize_debugfs(void)
130 debugfs_remove_recursive(dss_debugfs_dir); 123 debugfs_remove_recursive(dss_debugfs_dir);
131} 124}
132 125
133int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 126void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
134{ 127{
135 struct dentry *d; 128 debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, write, &dss_fops);
136
137 d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
138 write, &dss_fops);
139
140 return PTR_ERR_OR_ZERO(d);
141} 129}
142#else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ 130#else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */
143static inline int dss_initialize_debugfs(void) 131static inline void dss_initialize_debugfs(void)
144{ 132{
145 return 0;
146} 133}
147static inline void dss_uninitialize_debugfs(void) 134static inline void dss_uninitialize_debugfs(void)
148{ 135{
149} 136}
150int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 137void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
151{ 138{
152 return 0; 139 return 0;
153} 140}
@@ -188,9 +175,7 @@ static int __init omap_dss_probe(struct platform_device *pdev)
188 175
189 dss_features_init(omapdss_get_version()); 176 dss_features_init(omapdss_get_version());
190 177
191 r = dss_initialize_debugfs(); 178 dss_initialize_debugfs();
192 if (r)
193 goto err_debugfs;
194 179
195 if (def_disp_name) 180 if (def_disp_name)
196 core.default_display_name = def_disp_name; 181 core.default_display_name = def_disp_name;
@@ -198,10 +183,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
198 register_pm_notifier(&omap_dss_pm_notif_block); 183 register_pm_notifier(&omap_dss_pm_notif_block);
199 184
200 return 0; 185 return 0;
201
202err_debugfs:
203
204 return r;
205} 186}
206 187
207static int omap_dss_remove(struct platform_device *pdev) 188static int omap_dss_remove(struct platform_device *pdev)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.h b/drivers/video/fbdev/omap2/omapfb/dss/dss.h
index a3cc0ca8f9d2..b1a354494144 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss.h
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.h
@@ -214,7 +214,7 @@ struct platform_device *dss_get_core_pdev(void);
214int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); 214int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask);
215void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); 215void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask);
216int dss_set_min_bus_tput(struct device *dev, unsigned long tput); 216int dss_set_min_bus_tput(struct device *dev, unsigned long tput);
217int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); 217void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *));
218 218
219/* display */ 219/* display */
220int dss_suspend_all_devices(void); 220int dss_suspend_all_devices(void);