lkml.org 
[lkml]   [2016]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/2] mmc-block: Rename jump labels in mmc_blk_ioctl_copy_from_user()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Fri, 19 Aug 2016 22:52:50 +0200

    Adjust jump targets according to the Linux coding style convention.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/mmc/card/block.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
    index 6ce9492..0d83c56 100644
    --- a/drivers/mmc/card/block.c
    +++ b/drivers/mmc/card/block.c
    @@ -346,13 +346,13 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(

    if (copy_from_user(&idata->ic, user, sizeof(idata->ic))) {
    idata = ERR_PTR(-EFAULT);
    - goto idata_err;
    + goto free_idata;
    }

    idata->buf_bytes = (u64) idata->ic.blksz * idata->ic.blocks;
    if (idata->buf_bytes > MMC_IOC_MAX_BYTES) {
    idata = ERR_PTR(-EOVERFLOW);
    - goto idata_err;
    + goto free_idata;
    }

    if (!idata->buf_bytes) {
    @@ -365,11 +365,11 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
    idata->buf_bytes);
    if (IS_ERR(idata->buf)) {
    idata = (void *) idata->buf;
    - goto idata_err;
    + goto free_idata;
    }
    return idata;

    -idata_err:
    +free_idata:
    kfree(idata);
    out:
    return idata;
    --
    2.9.3
    \
     
     \ /
      Last update: 2016-09-17 09:57    [W:4.026 / U:1.408 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site