Re: [PATCH] media: i2c: imx219: Use dev_err_probe on probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 14, 2024 at 03:58:44PM +0100, Tommaso Merciai wrote:
> > > > @@ -1025,15 +1026,15 @@ static int imx219_identify_module(struct imx219 *imx219)
> > > >   	ret = cci_read(imx219->regmap, IMX219_REG_CHIP_ID, &val, NULL);
> > > >   	if (ret) {
> > > > -		dev_err(&client->dev, "failed to read chip id %x\n",
> > > > -			IMX219_CHIP_ID);
> > > > -		return ret;
> > > > +		return dev_err_probe(&client->dev, ret,
> > > > +				     "failed to read chip id %x\n",
> > > > +				     IMX219_CHIP_ID);
> > > >   	}
> > > I think you can remove also here the curve brakets we don't need that
> > > anymore.
> > 
> > I think multi-line single statement like this one, is better with { ... }
> > and is actually preferred?
> 
> Yep, some driver is using your pattern some other not.
> I'm curious about the truth :) (for my education :))

I'd prefer it without braces.

See the end of section 3 in Documentation/process/coding-style.rst .

-- 
Sakari Ailus




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux