diff options
author | Kevin McKinney <klmckinney1@gmail.com> | 2012-10-13 03:49:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-19 20:42:23 (GMT) |
commit | 68f7457d064f4c1972b0a58900a5dabcfd6bbb2e (patch) | |
tree | 9d9e659a6da38ceeb90555b5b9945443731eaf80 /drivers | |
parent | 1e2731eb503e7ddb09fe02d955918e466ad1b0a4 (diff) | |
download | linux-fsl-qoriq-68f7457d064f4c1972b0a58900a5dabcfd6bbb2e.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/bcm/InterfaceMisc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index a101f8f..179bcc2 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -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"); |