Skip to content

Commit

Permalink
eicon: fix sparse integer as NULL pointer warnings
Browse files Browse the repository at this point in the history
drivers/isdn/hardware/eicon/message.c:745:47: warning: Using plain integer as NULL pointer
drivers/isdn/hardware/eicon/message.c:761:45: warning: Using plain integer as NULL pointer
drivers/isdn/hardware/eicon/message.c:9122:16: warning: Using plain integer as NULL pointer
drivers/isdn/hardware/eicon/message.c:9147:16: warning: Using plain integer as NULL pointer
drivers/isdn/hardware/eicon/message.c:9173:14: warning: Using plain integer as NULL pointer
drivers/isdn/hardware/eicon/divasmain.c:396:23: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Harvey Harrison authored and Linus Torvalds committed Apr 28, 2008
1 parent 8e44b29 commit dd58c0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/isdn/hardware/eicon/divasmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void diva_free_dma_map(void *hdev, struct _diva_dma_map_entry *pmap)
dma_addr_t dma_handle;
void *addr_handle;

for (i = 0; (pmap != 0); i++) {
for (i = 0; (pmap != NULL); i++) {
diva_get_dma_map_entry(pmap, i, &cpu_addr, &phys_addr);
if (!cpu_addr) {
break;
Expand Down
12 changes: 6 additions & 6 deletions drivers/isdn/hardware/eicon/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ static void start_internal_command (dword Id, PLCI *plci, t_std_internal_comma
else
{
i = 1;
while (plci->internal_command_queue[i] != 0)
while (plci->internal_command_queue[i] != NULL)
i++;
plci->internal_command_queue[i] = command_function;
}
Expand All @@ -758,7 +758,7 @@ static void next_internal_command (dword Id, PLCI *plci)

plci->internal_command = 0;
plci->internal_command_queue[0] = NULL;
while (plci->internal_command_queue[1] != 0)
while (plci->internal_command_queue[1] != NULL)
{
for (i = 0; i < MAX_INTERNAL_COMMAND_LEVELS - 1; i++)
plci->internal_command_queue[i] = plci->internal_command_queue[i+1];
Expand Down Expand Up @@ -9119,7 +9119,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
dbug(1,dprintf("AdvSigPlci=0x%x",a->AdvSignalPLCI));
return 0x2001; /* codec in use by another application */
}
if(plci!=0)
if(plci!=NULL)
{
a->AdvSignalPLCI = plci;
plci->tel=ADV_VOICE;
Expand All @@ -9144,7 +9144,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
}
/* indicate D-ch connect if */
} /* codec is connected OK */
if(plci!=0)
if(plci!=NULL)
{
a->AdvSignalPLCI = plci;
plci->tel=ADV_VOICE;
Expand All @@ -9170,7 +9170,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
{
if(hook_listen) return 0x300B; /* Facility not supported */
/* no hook with SCOM */
if(plci!=0) plci->tel = CODEC;
if(plci!=NULL) plci->tel = CODEC;
dbug(1,dprintf("S/SCOM codec"));
/* first time we use the scom-s codec we must shut down the internal */
/* handset application of the card. This can be done by an assign with */
Expand Down Expand Up @@ -14604,7 +14604,7 @@ static void channel_xmit_extended_xon (PLCI * plci) {
int max_ch = ARRAY_SIZE(a->ch_flow_control);
int i, one_requested = 0;

if ((!plci) || (!plci->Id) || ((a = plci->adapter) == 0)) {
if ((!plci) || (!plci->Id) || ((a = plci->adapter) == NULL)) {
return;
}

Expand Down

0 comments on commit dd58c0d

Please sign in to comment.