This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here.
Showing the changes to drivers/staging/lirc/lirc_sasem.c (1 of 1365 files). Show all
Unified · Split
| @@ -387,8 +387,10 @@ static ssize_t vfd_write(struct file *file, const char *buf, · 386 unmodified lines | ||
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | data_buf = memdup_user(buf, n_bytes); |
| 390 | − if (PTR_ERR(data_buf)) | |
| 391 | − return PTR_ERR(data_buf); | |
| 390 | + if (IS_ERR(data_buf)) { | |
| 391 | + retval = PTR_ERR(data_buf); | |
| 392 | + goto exit; | |
| 393 | + } | |
| 392 | 394 | |
| 393 | 395 | memcpy(context->tx.data_buf, data_buf, n_bytes); |
| 394 | 396 | |
| @@ -513,7 +515,7 @@ exit: · 118 unmodified lines | ||
| 513 | 515 | mutex_unlock(&context->ctx_lock); |
| 514 | 516 | |
| 515 | 517 | mutex_unlock(&disconnect_lock); |
| 516 | − return 0; | |
| 518 | + return retval; | |
| 517 | 519 | } |
| 518 | 520 | |
| 519 | 521 | /** |
| @@ -804,7 +806,8 @@ static int sasem_probe(struct usb_interface *interface, · 284 unmodified lines | ||
| 804 | 806 | if (lirc_minor < 0) { |
| 805 | 807 | err("%s: lirc_register_driver failed", __func__); |
| 806 | 808 | alloc_status = 7; |
| 807 | − mutex_unlock(&context->ctx_lock); | |
| 809 | + retval = lirc_minor; | |
| 810 | + goto unlock; | |
| 808 | 811 | } else |
| 809 | 812 | printk(KERN_INFO "%s: Registered Sasem driver (minor:%d)\n", |
| 810 | 813 | __func__, lirc_minor); |
| @@ -829,7 +832,7 @@ alloc_status_switch: · 18 unmodified lines | ||
| 829 | 832 | context = NULL; |
| 830 | 833 | case 1: |
| 831 | 834 | retval = -ENOMEM; |
| 832 | − goto exit; | |
| 835 | + goto unlock; | |
| 833 | 836 | } |
| 834 | 837 | |
| 835 | 838 | /* Needed while unregistering! */ |
| @@ -860,7 +863,7 @@ alloc_status_switch: · 24 unmodified lines | ||
| 860 | 863 | |
| 861 | 864 | printk(KERN_INFO "%s: Sasem device on usb<%d:%d> initialized\n", |
| 862 | 865 | __func__, dev->bus->busnum, dev->devnum); |
| 863 | − | |
| 866 | +unlock: | |
| 864 | 867 | mutex_unlock(&context->ctx_lock); |
| 865 | 868 | exit: |
| 866 | 869 | return retval; |