Skip to content

Commit a01e035

Browse files
hharrisontorvalds
authored andcommitted
drivers: fix integer as NULL pointer warnings
Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a6a3a17 commit a01e035

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

drivers/char/cs5535_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int __init cs5535_gpio_init(void)
215215
else
216216
mask = 0x0b003c66;
217217

218-
if (request_region(gpio_base, CS5535_GPIO_SIZE, NAME) == 0) {
218+
if (!request_region(gpio_base, CS5535_GPIO_SIZE, NAME)) {
219219
printk(KERN_ERR NAME ": can't allocate I/O for GPIO\n");
220220
return -ENODEV;
221221
}

drivers/char/n_hdlc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
501501
__FILE__,__LINE__, count);
502502

503503
/* This can happen if stuff comes in on the backup tty */
504-
if (n_hdlc == 0 || tty != n_hdlc->tty)
504+
if (!n_hdlc || tty != n_hdlc->tty)
505505
return;
506506

507507
/* verify line is using HDLC discipline */

drivers/char/rio/rioroute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit)
526526
** If RTA is not powered on, the tx packets will be
527527
** unset, so go no further.
528528
*/
529-
if (PortP->TxStart == 0) {
529+
if (!PortP->TxStart) {
530530
rio_dprintk(RIO_DEBUG_ROUTE, "Tx pkts not set up yet\n");
531531
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
532532
break;

drivers/firmware/iscsi_ibft_find.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void __init reserve_ibft_region(void)
5858
unsigned int len = 0;
5959
void *virt;
6060

61-
ibft_addr = 0;
61+
ibft_addr = NULL;
6262

6363
for (pos = IBFT_START; pos < IBFT_END; pos += 16) {
6464
/* The table can't be inside the VGA BIOS reserved space,

drivers/mtd/maps/plat-ram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int platram_probe(struct platform_device *pdev)
209209
/* probe for the right mtd map driver
210210
* supplied by the platform_data struct */
211211

212-
if (pdata->map_probes != 0) {
212+
if (pdata->map_probes) {
213213
const char **map_probes = pdata->map_probes;
214214

215215
for ( ; !info->mtd && *map_probes; map_probes++)

drivers/pci/pcie/aer/aerdrv_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int aer_osc_setup(struct pcie_device *pciedev)
3131
{
3232
acpi_status status = AE_NOT_FOUND;
3333
struct pci_dev *pdev = pciedev->port;
34-
acpi_handle handle = 0;
34+
acpi_handle handle = NULL;
3535

3636
if (acpi_pci_disabled)
3737
return -1;

0 commit comments

Comments
 (0)