mirror of https://github.com/torvalds/linux.git
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:
parent
e29aca7038
commit
274b3458af
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue