Staging: bcm: Remove null dereference from InterfaceRDM.

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

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Kevin McKinney 2012-10-12 23:49:37 -04:00 committed by Greg Kroah-Hartman
parent 1e2731eb50
commit 68f7457d06

View File

@ -7,10 +7,8 @@ int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
{
int bytes;
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");