Commit 53f6f391 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by David S. Miller

caif: 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.

Cc: Richard Fontana <rfontana@redhat.com>
Cc: Steve Winslow <swinslow@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f20a697
...@@ -94,26 +94,20 @@ static inline void update_tty_status(struct ser_device *ser) ...@@ -94,26 +94,20 @@ static inline void update_tty_status(struct ser_device *ser)
} }
static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
{ {
ser->debugfs_tty_dir = ser->debugfs_tty_dir = debugfs_create_dir(tty->name, debugfsdir);
debugfs_create_dir(tty->name, debugfsdir);
if (!IS_ERR(ser->debugfs_tty_dir)) {
debugfs_create_blob("last_tx_msg", 0400,
ser->debugfs_tty_dir,
&ser->tx_blob);
debugfs_create_blob("last_rx_msg", 0400, debugfs_create_blob("last_tx_msg", 0400, ser->debugfs_tty_dir,
ser->debugfs_tty_dir, &ser->tx_blob);
&ser->rx_blob);
debugfs_create_x32("ser_state", 0400, debugfs_create_blob("last_rx_msg", 0400, ser->debugfs_tty_dir,
ser->debugfs_tty_dir, &ser->rx_blob);
(u32 *)&ser->state);
debugfs_create_x8("tty_status", 0400, debugfs_create_x32("ser_state", 0400, ser->debugfs_tty_dir,
ser->debugfs_tty_dir, (u32 *)&ser->state);
&ser->tty_status);
debugfs_create_x8("tty_status", 0400, ser->debugfs_tty_dir,
&ser->tty_status);
}
ser->tx_blob.data = ser->tx_data; ser->tx_blob.data = ser->tx_data;
ser->tx_blob.size = 0; ser->tx_blob.size = 0;
ser->rx_blob.data = ser->rx_data; ser->rx_blob.data = ser->rx_data;
......
...@@ -623,11 +623,7 @@ static void cfv_netdev_setup(struct net_device *netdev) ...@@ -623,11 +623,7 @@ static void cfv_netdev_setup(struct net_device *netdev)
/* Create debugfs counters for the device */ /* Create debugfs counters for the device */
static inline void debugfs_init(struct cfv_info *cfv) static inline void debugfs_init(struct cfv_info *cfv)
{ {
cfv->debugfs = cfv->debugfs = debugfs_create_dir(netdev_name(cfv->ndev), NULL);
debugfs_create_dir(netdev_name(cfv->ndev), NULL);
if (IS_ERR(cfv->debugfs))
return;
debugfs_create_u32("rx-napi-complete", 0400, cfv->debugfs, debugfs_create_u32("rx-napi-complete", 0400, cfv->debugfs,
&cfv->stats.rx_napi_complete); &cfv->stats.rx_napi_complete);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment