Commit 2807dbe1 authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: Remove null dereference from InterfaceWRM.



This patch removes a potential null dereference
from InterfaceMisc.c, function InterfaceWRM. This
error was reported by Smatch.

Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68f7457d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -55,10 +55,8 @@ int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter,
{
	int retval = 0;

	if (!psIntfAdapter) {
		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Interface Adapter  is NULL");
	if (!psIntfAdapter)
		return -EINVAL;
	}

	if (psIntfAdapter->psAdapter->device_removed == TRUE) {
		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Device got removed");