Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bc7e29c authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville
Browse files

brcm80211: fmac: remove unnecessary NULL pointer check



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: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarKan Yan <kanyan@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ebecdcc1
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -712,9 +712,6 @@ static int brcmf_usb_up(struct device *dev)
	struct brcmf_usbdev_info *devinfo = brcmf_usb_get_businfo(dev);
	struct brcmf_usbdev_info *devinfo = brcmf_usb_get_businfo(dev);
	u16 ifnum;
	u16 ifnum;


	if (devinfo == NULL)
		return -EINVAL;

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