From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: [PATCH] char_dev: Remove pointless assignment from __register_chrdev_region() Date: Wed, 22 Oct 2014 09:40:53 +0200 Message-ID: <1413963653-26231-1-git-send-email-jack@suse.cz> Cc: linux-fsdevel@vger.kernel.org, Jan Kara To: Alexander Viro Return-path: Received: from cantor2.suse.de ([195.135.220.15]:33525 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbaJVHk4 (ORCPT ); Wed, 22 Oct 2014 03:40:56 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: At one place we assign major number we found to ret. That assignment is then never used and actually doesn't make any sense given how the code is currently structured (the assignment comes from pre-git times). Just remove it. Coverity-id: 1226852 Signed-off-by: Jan Kara --- fs/char_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/char_dev.c b/fs/char_dev.c index f77f7702fabe..67b2007f10fe 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -117,7 +117,6 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor, goto out; } major = i; - ret = major; } cd->major = major; -- 1.8.1.4