mirror of
				https://github.com/DigitalDevices/dddvb.git
				synced 2025-03-01 10:35:23 +00:00 
			
		
		
		
	replace 0 with proper NULL pointer
This commit is contained in:
		| @@ -30,7 +30,7 @@ | ||||
|  | ||||
| struct workqueue_struct *ddb_wq; | ||||
|  | ||||
| DEFINE_MUTEX(redirect_lock); /* lock for redirect */ | ||||
| static DEFINE_MUTEX(redirect_lock); /* lock for redirect */ | ||||
|  | ||||
| static int adapter_alloc; | ||||
| module_param(adapter_alloc, int, 0444); | ||||
| @@ -157,8 +157,8 @@ static void ddb_redirect_dma(struct ddb *dev, | ||||
|  | ||||
| static int ddb_unredirect(struct ddb_port *port) | ||||
| { | ||||
| 	struct ddb_input *oredi, *iredi = 0; | ||||
| 	struct ddb_output *iredo = 0; | ||||
| 	struct ddb_input *oredi, *iredi = NULL; | ||||
| 	struct ddb_output *iredo = NULL; | ||||
|  | ||||
| 	mutex_lock(&redirect_lock); | ||||
| 	if (port->output->dma->running) { | ||||
| @@ -179,14 +179,14 @@ static int ddb_unredirect(struct ddb_port *port) | ||||
| 				ddb_redirect_dma(oredi->port->dev, | ||||
| 						 oredi->dma, iredo->dma); | ||||
| 			} | ||||
| 			port->input[0]->redo = 0; | ||||
| 			port->input[0]->redo = NULL; | ||||
| 			ddb_set_dma_table(port->input[0]); | ||||
| 		} | ||||
| 		oredi->redi = iredi; | ||||
| 		port->input[0]->redi = 0; | ||||
| 		port->input[0]->redi = NULL; | ||||
| 	} | ||||
| 	oredi->redo = 0; | ||||
| 	port->output->redi = 0; | ||||
| 	oredi->redo = NULL; | ||||
| 	port->output->redi = NULL; | ||||
|  | ||||
| 	ddb_set_dma_table(oredi); | ||||
| done: | ||||
| @@ -228,7 +228,7 @@ static int ddb_redirect(u32 i, u32 p) | ||||
| 	if (input2) { | ||||
| 		if (input->redi) { | ||||
| 			input2->redi = input->redi; | ||||
| 			input->redi = 0; | ||||
| 			input->redi = NULL; | ||||
| 		} else { | ||||
| 			input2->redi = input; | ||||
| 		} | ||||
| @@ -1005,11 +1005,11 @@ static const struct file_operations ci_fops = { | ||||
| 	.open    = ts_open, | ||||
| 	.release = ts_release, | ||||
| 	.poll    = ts_poll, | ||||
| 	.mmap    = 0, | ||||
| 	.mmap    = NULL, | ||||
| }; | ||||
|  | ||||
| static struct dvb_device dvbdev_ci = { | ||||
| 	.priv    = 0, | ||||
| 	.priv    = NULL, | ||||
| 	.readers = 1, | ||||
| 	.writers = 1, | ||||
| 	.users   = 2, | ||||
| @@ -1032,12 +1032,12 @@ static const struct file_operations mod_fops = { | ||||
| 	.open    = mod_open, | ||||
| 	.release = mod_release, | ||||
| 	.poll    = ts_poll, | ||||
| 	.mmap    = 0, | ||||
| 	.mmap    = NULL, | ||||
| 	.unlocked_ioctl = mod_ioctl, | ||||
| }; | ||||
|  | ||||
| static struct dvb_device dvbdev_mod = { | ||||
| 	.priv    = 0, | ||||
| 	.priv    = NULL, | ||||
| 	.readers = 1, | ||||
| 	.writers = 1, | ||||
| 	.users   = 2, | ||||
| @@ -4156,7 +4156,7 @@ static int ddb_device_create(struct ddb *dev) | ||||
| 	if (res) { | ||||
| 		ddb_device_attrs_del(dev); | ||||
| 		device_destroy(&ddb_class, MKDEV(ddb_major, dev->nr)); | ||||
| 		ddbs[dev->nr] = 0; | ||||
| 		ddbs[dev->nr] = NULL; | ||||
| 		dev->ddb_dev = ERR_PTR(-ENODEV); | ||||
| 	} else { | ||||
| 		ddb_num++; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user