Skip to content

Commit

Permalink
mtd: rawnand: davinci: Remove redundant unsigned comparison to zero
Browse files Browse the repository at this point in the history
Since core_chipsel is uint32_t, comparison to zero is redundant

Signed-off-by: Wang Weiyang <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
  • Loading branch information
Wang Weiyang authored and miquelraynal committed Apr 4, 2022
1 parent 3123109 commit 6425dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/davinci_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
return -ENODEV;

/* which external chipselect will we be managing? */
if (pdata->core_chipsel < 0 || pdata->core_chipsel > 3)
if (pdata->core_chipsel > 3)
return -ENODEV;

info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
Expand Down

0 comments on commit 6425dd1

Please sign in to comment.