mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
can: af_can: can_rx_register(): use max() instead of open coding it
This patch replaces an open coded max by the proper kernel define max(). Acked-by: Oliver Hartkopp <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
This commit is contained in:
parent
6625a18e9f
commit
e2586a5796
1 changed files with 2 additions and 2 deletions
|
|
@ -474,8 +474,8 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
|
|||
dev_rcv_lists->entries++;
|
||||
|
||||
rcv_lists_stats->rcv_entries++;
|
||||
if (rcv_lists_stats->rcv_entries_max < rcv_lists_stats->rcv_entries)
|
||||
rcv_lists_stats->rcv_entries_max = rcv_lists_stats->rcv_entries;
|
||||
rcv_lists_stats->rcv_entries_max = max(rcv_lists_stats->rcv_entries_max,
|
||||
rcv_lists_stats->rcv_entries);
|
||||
} else {
|
||||
kmem_cache_free(rcv_cache, rcv);
|
||||
err = -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in a new issue