Re: [PATCH 2/2] i2c: xiic: Add atomic transfer support
From: Wolfram Sang
Date: Sun Nov 24 2024 - 10:35:18 EST
> > + while (xiic_rx_space(i2c)) {
> Let's remind what xiic_rx_space is
> #define xiic_rx_space(i2c) ((i2c)->rx_msg->len - (i2c)->rx_pos)
>
> > + if (xiic_getreg32(i2c, XIIC_IISR_OFFSET) & XIIC_INTR_RX_FULL_MASK) {
> > + if (!i2c->rx_msg) {
> This check is suspicious. If i2c->rx_msg is NULL then the while
> above already dereferenced a NULL pointer.
> What is going on?
Valid point. I'll remove the patches from the pull request.
Attachment:
signature.asc
Description: PGP signature