Commit c5274ab0 authored by Greg Dietsche's avatar Greg Dietsche Committed by Greg Kroah-Hartman

staging: remove unnecessary code

Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;
Signed-off-by: default avatarGreg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9996059d
...@@ -1447,16 +1447,10 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount) ...@@ -1447,16 +1447,10 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount)
int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
{ {
INT uiRetVal =0; return Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
uiRetVal = Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
uiAddress, pucBuff, sSize); uiAddress, pucBuff, sSize);
if(uiRetVal < 0)
return uiRetVal;
return uiRetVal;
} }
int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
{ {
int iRetVal; int iRetVal;
......
...@@ -4164,13 +4164,7 @@ s32 wl_cfg80211_down(void) ...@@ -4164,13 +4164,7 @@ s32 wl_cfg80211_down(void)
static s32 wl_dongle_probecap(struct wl_priv *wl) static s32 wl_dongle_probecap(struct wl_priv *wl)
{ {
s32 err = 0; return wl_update_wiphybands(wl);
err = wl_update_wiphybands(wl);
if (unlikely(err))
return err;
return err;
} }
static void *wl_read_prof(struct wl_priv *wl, s32 item) static void *wl_read_prof(struct wl_priv *wl, s32 item)
......
...@@ -1291,10 +1291,10 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, ...@@ -1291,10 +1291,10 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg,
s->lock = file; s->lock = file;
spin_unlock_irqrestore(&s->spin_lock, flags); spin_unlock_irqrestore(&s->spin_lock, flags);
#if 0
if (ret < 0) if (ret < 0)
return ret; return ret;
#if 0
if (s->lock_f) if (s->lock_f)
ret = s->lock_f(dev, s); ret = s->lock_f(dev, s);
#endif #endif
......
...@@ -1935,11 +1935,8 @@ static int usbdux_pwm_cancel(struct comedi_device *dev, ...@@ -1935,11 +1935,8 @@ static int usbdux_pwm_cancel(struct comedi_device *dev,
dev_dbg(&this_usbduxsub->interface->dev, dev_dbg(&this_usbduxsub->interface->dev,
"comedi %d: sending pwm off command to the usb device.\n", "comedi %d: sending pwm off command to the usb device.\n",
dev->minor); dev->minor);
res = send_dux_commands(this_usbduxsub, SENDPWMOFF);
if (res < 0)
return res;
return res; return send_dux_commands(this_usbduxsub, SENDPWMOFF);
} }
static void usbduxsub_pwm_irq(struct urb *urb) static void usbduxsub_pwm_irq(struct urb *urb)
......
...@@ -994,11 +994,7 @@ static int fill_board_specific_data(struct tm6000_core *dev) ...@@ -994,11 +994,7 @@ static int fill_board_specific_data(struct tm6000_core *dev)
if (rc < 0) if (rc < 0)
return rc; return rc;
rc = v4l2_device_register(&dev->udev->dev, &dev->v4l2_dev); return v4l2_device_register(&dev->udev->dev, &dev->v4l2_dev);
if (rc < 0)
return rc;
return rc;
} }
......
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