On Mon, Aug 08, 2016 at 05:48:28PM +0530, kamlakant.patel@xxxxxxxxxxxx wrote: > - if (IS_ERR(clk)) { > - dev_err(&pdev->dev, "could not get spi clock\n"); > - return -ENODEV; > - } > + if (IS_ERR(clk)) > + return -EPROBE_DEFER; > + No, this is broken - if there really is a fatal error it'll silently discard it and replace it with -EPROBE_DEFER. This will cause things to be incorrectly deferred if there is a real error making it harder for people to diagnose problems. You should just pass the error code you get back to the caller.
Attachment:
signature.asc
Description: PGP signature