* [patch] Staging: bcm: remove unneeded NULL check
@ 2010-10-08 12:57 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-10-08 12:57 UTC (permalink / raw)
To: kernel-janitors
The error handling here is wrong. If psIntfAdapter were NULL then we
would have a NULL dereference in the debug output on the error path.
But this function is only called from usbbcm_device_probe() when
psIntfAdapter is non-NULL.
Since the check isn't needed and I removed it instead of fixing it.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c
index 81523b1..824f9a4 100644
--- a/drivers/staging/bcm/InterfaceInit.c
+++ b/drivers/staging/bcm/InterfaceInit.c
@@ -529,11 +529,6 @@ INT InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter)
BOOLEAN bBcm16 = FALSE;
UINT uiData = 0;
- if(psIntfAdapter = NULL)
- {
- BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Interface Adapter is NULL");
- return -EINVAL;
- }
/* Store the usb dev into interface adapter */
psIntfAdapter->udev = usb_get_dev(interface_to_usbdev(
psIntfAdapter->interface));
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-08 12:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 12:57 [patch] Staging: bcm: remove unneeded NULL check Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.