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>
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);