mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
CRISv10: remove redundant tests on unsigned
Since dmanr is unsigned, negatives are wrapped and caught by the other test. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
This commit is contained in:
parent
768c31495a
commit
7b994836f0
@ -24,7 +24,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
|
||||
unsigned long int gens;
|
||||
int fail = -EINVAL;
|
||||
|
||||
if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) {
|
||||
if (dmanr >= MAX_DMA_CHANNELS) {
|
||||
printk(KERN_CRIT "cris_request_dma: invalid DMA channel %u\n", dmanr);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -213,7 +213,7 @@ int cris_request_dma(unsigned int dmanr, const char * device_id,
|
||||
void cris_free_dma(unsigned int dmanr, const char * device_id)
|
||||
{
|
||||
unsigned long flags;
|
||||
if ((dmanr < 0) || (dmanr >= MAX_DMA_CHANNELS)) {
|
||||
if (dmanr >= MAX_DMA_CHANNELS) {
|
||||
printk(KERN_CRIT "cris_free_dma: invalid DMA channel %u\n", dmanr);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user