Skip to content

Commit

Permalink
brcm80211: fmac: remove unnecessary NULL pointer check
Browse files Browse the repository at this point in the history
In brcmf_usb_up() the variable devinfo was checked for being
a NULL pointer, but this can not happen. Also the check was done
after dereferencing the pointer. This patch removes the check.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Mar 5, 2012
1 parent ebecdcc commit 3bc7e29
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/wireless/brcm80211/brcmfmac/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,6 @@ static int brcmf_usb_up(struct device *dev)
struct brcmf_usbdev_info *devinfo = brcmf_usb_get_businfo(dev);
u16 ifnum;

if (devinfo == NULL)
return -EINVAL;

if (devinfo->bus_pub.state == BCMFMAC_USB_STATE_UP)
return 0;

Expand Down

0 comments on commit 3bc7e29

Please sign in to comment.