summaryrefslogtreecommitdiffstats
path: root/drivers/tty/synclink.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-09-17 15:10:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 12:31:48 -0400
commit556c27806071d61e2b2e6da7c0a77b1efa4cd832 (patch)
tree7341bb35a59c4911b71d00dc668888515ace97d7 /drivers/tty/synclink.c
parentf0a8d84fa1140a1c10bfcf0fb73664a85551512e (diff)
tty: synclink: Reuse an existing error handling path
In order to avoid code duplication and to be more consistent with the other error handling paths in this function, we should 'goto errout'. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/synclink.c')
-rw-r--r--drivers/tty/synclink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index 3be981101297..27db7818b673 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -4098,8 +4098,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
4098 if (request_dma(info->dma_level,info->device_name) < 0){ 4098 if (request_dma(info->dma_level,info->device_name) < 0){
4099 printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n", 4099 printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n",
4100 __FILE__,__LINE__,info->device_name, info->dma_level ); 4100 __FILE__,__LINE__,info->device_name, info->dma_level );
4101 mgsl_release_resources( info ); 4101 goto errout;
4102 return -ENODEV;
4103 } 4102 }
4104 info->dma_requested = true; 4103 info->dma_requested = true;
4105 4104