1
0
Fork 0

i2c: bpmp-tegra: Ignore unknown I2C_M flags

commit bc1c2048ab upstream.

In order to not to start returning errors when new I2C_M flags are
added, change behavior to just ignore all flags that we don't know
about. This includes the I2C_M_DMA_SAFE flag that already exists but
causes -EINVAL to be returned for valid transactions.

Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Mikko Perttunen 2021-01-12 12:22:25 +02:00 committed by Greg Kroah-Hartman
parent 09f983f0c7
commit 60066d5181
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
flags &= ~I2C_M_RECV_LEN;
}
return (flags != 0) ? -EINVAL : 0;
return 0;
}
/**