spi: microchip-core: Replace dead code (-ENOMEM error message)

First of all, the convention in the kernel that we do not issue
error messages for -ENOMEM. Second, it's ignored by dev_err_probe().
Replace dead code by a simple return statement.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
Link: https://patch.msgid.link/20251126075558.2035012-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko 2025-11-26 08:54:41 +01:00 committed by Mark Brown
parent e29aca7038
commit 274b3458af
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 2 deletions

View File

@ -305,8 +305,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
host = devm_spi_alloc_host(&pdev->dev, sizeof(*spi));
if (!host)
return dev_err_probe(&pdev->dev, -ENOMEM,
"unable to allocate host for SPI controller\n");
return -ENOMEM;
platform_set_drvdata(pdev, host);