Skip to content

Commit

Permalink
staging: remove unnecessary code
Browse files Browse the repository at this point in the history
Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <[email protected]>
Acked-by: Franky Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
farmergreg authored and gregkh committed Jun 28, 2011
1 parent 9996059 commit c5274ab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
10 changes: 2 additions & 8 deletions drivers/staging/bcm/Misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 uiRetVal =0;

uiRetVal = Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
return Adapter->interface_rdm(Adapter->pvInterfaceAdapter,
uiAddress, pucBuff, sSize);

if(uiRetVal < 0)
return uiRetVal;

return uiRetVal;
}

int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize)
{
int iRetVal;
Expand Down
8 changes: 1 addition & 7 deletions drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4164,13 +4164,7 @@ s32 wl_cfg80211_down(void)

static s32 wl_dongle_probecap(struct wl_priv *wl)
{
s32 err = 0;

err = wl_update_wiphybands(wl);
if (unlikely(err))
return err;

return err;
return wl_update_wiphybands(wl);
}

static void *wl_read_prof(struct wl_priv *wl, s32 item)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,10 +1291,10 @@ static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg,
s->lock = file;
spin_unlock_irqrestore(&s->spin_lock, flags);

#if 0
if (ret < 0)
return ret;

#if 0
if (s->lock_f)
ret = s->lock_f(dev, s);
#endif
Expand Down
5 changes: 1 addition & 4 deletions drivers/staging/comedi/drivers/usbdux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1935,11 +1935,8 @@ static int usbdux_pwm_cancel(struct comedi_device *dev,
dev_dbg(&this_usbduxsub->interface->dev,
"comedi %d: sending pwm off command to the usb device.\n",
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)
Expand Down
6 changes: 1 addition & 5 deletions drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,7 @@ static int fill_board_specific_data(struct tm6000_core *dev)
if (rc < 0)
return rc;

rc = v4l2_device_register(&dev->udev->dev, &dev->v4l2_dev);
if (rc < 0)
return rc;

return rc;
return v4l2_device_register(&dev->udev->dev, &dev->v4l2_dev);
}


Expand Down

0 comments on commit c5274ab

Please sign in to comment.