diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2021-01-07 16:11:28 +0300 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2021-01-07 16:11:28 +0300 |
commit | 2313f4700327fb7d6aa3989edfa5bffcd7080d36 (patch) | |
tree | 4781ddf9b844024cede6c8e99d3d509192d977c9 /drivers/usb/misc/apple-mfi-fastcharge.c | |
parent | 70612d0e121e55ea3c057c526bf7374da41aa2f0 (diff) | |
parent | cb3cfbf79aff7decb4e5ee69a7c74864497f61dc (diff) | |
download | linux-2313f4700327fb7d6aa3989edfa5bffcd7080d36.tar.xz |
Merge drm/drm-next into drm-misc-next
Staying in sync to drm-next, and to be able to pull ttm fixes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/usb/misc/apple-mfi-fastcharge.c')
-rw-r--r-- | drivers/usb/misc/apple-mfi-fastcharge.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c index 9de0171b5177..ac8695195c13 100644 --- a/drivers/usb/misc/apple-mfi-fastcharge.c +++ b/drivers/usb/misc/apple-mfi-fastcharge.c @@ -184,10 +184,8 @@ static int mfi_fc_probe(struct usb_device *udev) return -ENODEV; mfi = kzalloc(sizeof(struct mfi_device), GFP_KERNEL); - if (!mfi) { - err = -ENOMEM; - goto error; - } + if (!mfi) + return -ENOMEM; battery_cfg.drv_data = mfi; @@ -198,17 +196,14 @@ static int mfi_fc_probe(struct usb_device *udev) if (IS_ERR(mfi->battery)) { dev_err(&udev->dev, "Can't register battery\n"); err = PTR_ERR(mfi->battery); - goto error; + kfree(mfi); + return err; } mfi->udev = usb_get_dev(udev); dev_set_drvdata(&udev->dev, mfi); return 0; - -error: - kfree(mfi); - return err; } static void mfi_fc_disconnect(struct usb_device *udev) |