Skip to content

Commit

Permalink
net: alacritech: Partially revert "net: alacritech: Switch to use dev…
Browse files Browse the repository at this point in the history
…_err_probe()"

This reverts commit bf4d87f because it
introduced dev_err_probe() in non-probe path, which is not desired.

In general, calling dev_err_probe() after successful probe in case of
handling -EPROBE_DEFER error, will set deferred status on the device
already probed.  This is however not a problem here now, because
dev_err_probe() in affected places is used for handling errors from
request_firmware(), which does not return -EPROBE_DEFER.  Still usage of
dev_err_probe() in such case is not correct, because request_firmware()
could once return -EPROBE_DEFER.

Fixes: bf4d87f ("net: alacritech: Switch to use dev_err_probe()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240902163610.17028-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Jakub Kicinski committed Sep 3, 2024
1 parent d2088ca commit 9748229
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/net/ethernet/alacritech/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,11 @@ static int slic_load_rcvseq_firmware(struct slic_device *sdev)
file = (sdev->model == SLIC_MODEL_OASIS) ? SLIC_RCV_FIRMWARE_OASIS :
SLIC_RCV_FIRMWARE_MOJAVE;
err = request_firmware(&fw, file, &sdev->pdev->dev);
if (err)
return dev_err_probe(&sdev->pdev->dev, err,
if (err) {
dev_err(&sdev->pdev->dev,
"failed to load receive sequencer firmware %s\n", file);
return err;
}
/* Do an initial sanity check concerning firmware size now. A further
* check follows below.
*/
Expand Down Expand Up @@ -1124,9 +1126,10 @@ static int slic_load_firmware(struct slic_device *sdev)
file = (sdev->model == SLIC_MODEL_OASIS) ? SLIC_FIRMWARE_OASIS :
SLIC_FIRMWARE_MOJAVE;
err = request_firmware(&fw, file, &sdev->pdev->dev);
if (err)
return dev_err_probe(&sdev->pdev->dev, err,
"failed to load firmware %s\n", file);
if (err) {
dev_err(&sdev->pdev->dev, "failed to load firmware %s\n", file);
return err;
}
/* Do an initial sanity check concerning firmware size now. A further
* check follows below.
*/
Expand Down

0 comments on commit 9748229

Please sign in to comment.