Skip to content

Commit

Permalink
plugins: adrv9002: fix carrier handling for adrv9003
Browse files Browse the repository at this point in the history
Adrv9003 only has 1 TX. As such we should not try to update the other TX
carrier value as that would lead to a segfault.

Signed-off-by: Nuno Sa <[email protected]>
  • Loading branch information
nunojsa committed Dec 20, 2023
1 parent bcd122b commit 94d6df3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/adrv9002.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ static void adrv9002_save_carrier_freq(GtkWidget *widget, struct adrv9002_common
* actually skip updating the widget but doing it unconditionally it's just much
* simpler and allow us to drop all the code to keep the LO mappings.
*/
if (tx)
if (tx && other < priv->n_txs)
iio_widget_update_block_signals_by_data(&priv->tx_widgets[other].carrier);
else
iio_widget_update_block_signals_by_data(&priv->rx_widgets[other].rx.carrier);
Expand Down

0 comments on commit 94d6df3

Please sign in to comment.