extcon: intel-mrfld: Don't shadow error from devm_extcon_dev_allocate()

Don't shadow error from devm_extcon_dev_allocate() and return it as is.

Link: https://lore.kernel.org/lkml/20231222161854.2955859-1-andriy.shevchenko@linux.intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
Andy Shevchenko 2024-02-23 16:42:01 +09:00 committed by Chanwoo Choi
parent b1781d0a14
commit b1a8804f53

View File

@ -214,7 +214,7 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
data->edev = devm_extcon_dev_allocate(dev, mrfld_extcon_cable);
if (IS_ERR(data->edev))
return -ENOMEM;
return PTR_ERR(data->edev);
ret = devm_extcon_dev_register(dev, data->edev);
if (ret < 0)