mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	Bluetooth: hci_h5: directly return hci_uart_register_device() ret-val
Since the hci_uart_register_device() call is the last thing we do in h5_serdev_probe() we can simply directly return its return-value. Cc: Archie Pusaka <apusaka@google.com> Suggested-by: Archie Pusaka <apusaka@google.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
		
							parent
							
								
									9a9023f314
								
							
						
					
					
						commit
						6fc165337b
					
				
					 1 changed files with 1 additions and 6 deletions
				
			
		|  | @ -816,7 +816,6 @@ static int h5_serdev_probe(struct serdev_device *serdev) | |||
| 	struct device *dev = &serdev->dev; | ||||
| 	struct h5 *h5; | ||||
| 	const struct h5_device_data *data; | ||||
| 	int err; | ||||
| 
 | ||||
| 	h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL); | ||||
| 	if (!h5) | ||||
|  | @ -860,11 +859,7 @@ static int h5_serdev_probe(struct serdev_device *serdev) | |||
| 	if (IS_ERR(h5->device_wake_gpio)) | ||||
| 		return PTR_ERR(h5->device_wake_gpio); | ||||
| 
 | ||||
| 	err = hci_uart_register_device(&h5->serdev_hu, &h5p); | ||||
| 	if (err) | ||||
| 		return err; | ||||
| 
 | ||||
| 	return 0; | ||||
| 	return hci_uart_register_device(&h5->serdev_hu, &h5p); | ||||
| } | ||||
| 
 | ||||
| static void h5_serdev_remove(struct serdev_device *serdev) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Hans de Goede
						Hans de Goede