Re: [PATCH v2 2/5] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility

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

 



Hello Jonathan,

On Sat, Apr 22, 2023 at 06:28:33PM +0100, Jonathan Cameron wrote:
> On Thu, 20 Apr 2023 22:22:02 +0200
> Mehdi Djait <mehdi.djait.k@xxxxxxxxx> wrote:
> 
> > Avoid error returns on a failure to match and instead just warn with
> > assumption that we have a correct dt-binding telling us that
> > some new device with a different ID is backwards compatible.
> > 
> > Signed-off-by: Mehdi Djait <mehdi.djait.k@xxxxxxxxx>
> > ---
> > v2:
> > - no changes, this patch is introduced in the v2
> > 
> >  drivers/iio/accel/kionix-kx022a.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
> > index f98393d74666..70530005cad3 100644
> > --- a/drivers/iio/accel/kionix-kx022a.c
> > +++ b/drivers/iio/accel/kionix-kx022a.c
> > @@ -1038,9 +1038,7 @@ int kx022a_probe_internal(struct device *dev)
> >  		return dev_err_probe(dev, ret, "Failed to access sensor\n");
> >  
> >  	if (chip_id != KX022A_ID) {
> > -		dev_err(dev, "unsupported device 0x%x\n", chip_id);
> > -		return -EINVAL;
> > -	}
> > +		dev_warn(dev, "unsupported device 0x%x\n", chip_id);
> 
> Try building this ;)  You have remove the closing bracket but kept the opening
> one.

Oops! I will fix this :)

--
Kind Regards
Mehdi Djait



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux