Skip to content

Commit

Permalink
Staging: bcm: Change the style of comparing structures to null in Int…
Browse files Browse the repository at this point in the history
…erfaceMisc.c.

This patch changes the style of comparing
structures to null. Instead of this:
"if (foo == NULL) {" or "if (foo != NULL) {",
the new logic uses: "if (!foo) {" or
"if (foo) {".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent 5f997ee commit de3615f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/bcm/InterfaceMisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter,
int bytes;
unsigned short usRetries = 0;

if (psIntfAdapter == NULL) {
if (!psIntfAdapter) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Interface Adapter is NULL");
return -EINVAL;
}
Expand Down Expand Up @@ -65,7 +65,7 @@ int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter,
int retval = 0;
unsigned short usRetries = 0;

if (psIntfAdapter == NULL) {
if (!psIntfAdapter) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Interface Adapter is NULL");
return -EINVAL;
}
Expand Down Expand Up @@ -193,7 +193,7 @@ VOID Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter)
*/

/* Cancel submitted Interrupt-URB's */
if (psIntfAdapter->psInterruptUrb != NULL) {
if (psIntfAdapter->psInterruptUrb) {
if (psIntfAdapter->psInterruptUrb->status == -EINPROGRESS)
usb_kill_urb(psIntfAdapter->psInterruptUrb);
}
Expand Down

0 comments on commit de3615f

Please sign in to comment.