Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Greg Kroah-Hartman and committed by
Bartlomiej Zolnierkiewicz
60d2fa0d 1ea673ad

+7 -26
+6 -25
drivers/video/fbdev/omap2/omapfb/dss/core.c
··· 110 110 111 111 static struct dentry *dss_debugfs_dir; 112 112 113 - static int dss_initialize_debugfs(void) 113 + static void dss_initialize_debugfs(void) 114 114 { 115 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 117 debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, 123 118 &dss_debug_dump_clocks, &dss_fops); 124 - 125 - return 0; 126 119 } 127 120 128 121 static void dss_uninitialize_debugfs(void) ··· 123 130 debugfs_remove_recursive(dss_debugfs_dir); 124 131 } 125 132 126 - int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 133 + void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 127 134 { 128 - struct dentry *d; 129 - 130 - d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, 131 - write, &dss_fops); 132 - 133 - return PTR_ERR_OR_ZERO(d); 135 + debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, write, &dss_fops); 134 136 } 135 137 #else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ 136 - static inline int dss_initialize_debugfs(void) 138 + static inline void dss_initialize_debugfs(void) 137 139 { 138 - return 0; 139 140 } 140 141 static inline void dss_uninitialize_debugfs(void) 141 142 { 142 143 } 143 - int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 144 + void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 144 145 { 145 146 return 0; 146 147 } ··· 175 188 176 189 dss_features_init(omapdss_get_version()); 177 190 178 - r = dss_initialize_debugfs(); 179 - if (r) 180 - goto err_debugfs; 191 + dss_initialize_debugfs(); 181 192 182 193 if (def_disp_name) 183 194 core.default_display_name = def_disp_name; ··· 183 198 register_pm_notifier(&omap_dss_pm_notif_block); 184 199 185 200 return 0; 186 - 187 - err_debugfs: 188 - 189 - return r; 190 201 } 191 202 192 203 static int omap_dss_remove(struct platform_device *pdev)
+1 -1
drivers/video/fbdev/omap2/omapfb/dss/dss.h
··· 214 214 int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); 215 215 void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); 216 216 int dss_set_min_bus_tput(struct device *dev, unsigned long tput); 217 - int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); 217 + void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); 218 218 219 219 /* display */ 220 220 int dss_suspend_all_devices(void);